Jump to content

Donwey

New Members
  • Posts

    3
  • Joined

  • Last visited

Donwey's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. EDIT : somehow made it work with : (\w+\s+\W)(\w+)\(([^\)]+)\); But iam not sure about what other declarations i can get and if the regex will detect them. Is it possible to make regex even b etter to make sure it will detect all possible C99 function declarations?
  2. Wow Thanks for answering so quickly , tryed it, seems to work ... but it should work with all function declarations you can type in C99 standard for example : char *stringGet(tString *str); schould return [type]--> char * [name] => stringGet [params] => Array ( [0] =>tString *str ) But its not detecting it so it ignores it :/ Is it possible to detect it?
  3. Hey all, Ive been lately dealing with a problem how to properly detect c function declarations in .h file (which is C99 standard) and save its info .... Suppose we have a .h file consisting of 3 lines: struct SymbolTable; void initContext(Context *pt); (<----- function 1) void deleteContext(Context *pt); i need a regular expresions to detect those function declarations and possibly save its info accordingly to this: $function1type == void $function1name == initContext $function1params == Context *pt Is it possible? Ive been struggling a lot with this but cant get it to work... In a .h file i have already removed blocs and macros and comments...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.