java - Scanning C header files and save the prototypes and variables in an ArrayList -


i making simple c ide through java. set auto completion feature need function prototypes of included header file.

to start have scanned header file out of source code:

 arraylist prototypes=new arraylist(); string[] lines=source.split("\n"); (string s: lines){ if(s.startswith("#include"){       string file="/usr/include/"+s.substring(s.indexof("<")+1,s.indexof(">")-1);       //todo scanning file  } } 

so code should replace commented line function prototypes in header stored in prototypes arraylist .

if alternative there such api job feel free suggest.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -