i need to get all the functions from a c++ header file with haskell (not methods only functions), i need the input parameters and the return type also the method name.
how could i realise this? olny with regex? or must i write a whole parser (bottom-up or top-down)?
To extract all the function declarations from a header file, you’ll need a parser, not a regex. Parsers for C++ are hard to come by, but luckily we have some:
Using either of these you’ll be able to robustly process C or C++ headers, and extract declarations as Haskell data types, for further processing.