skip to Main Content

I am developing an IDE which supports c programming language.

i want to implement a autocomplete feature by pressing ctrl+space.

For that i need to extract all function prototypes from header files.

Please suggest me the way

Thanks
suchetan

2

Answers


  1. As @jww said in a comment: have a look at ctags or the more elaborate: cscope, both of which are usable for completion in vim.

    Specifically have a look at cscope’s scanner which uses flex to create a scanner that identifies token types.

    Login or Signup to reply.
  2. shell script to extract all functions except constructor and destructor from XYZ.cpp:

    ctags -x XYZ.cpp | grep function | awk '{print $6}' | grep "XYZ" | awk -F'::' '{print $2}' | awk -F'(' '{print $1}'
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search