[Language C properties]

Aaron Tomb aarontomb at gmail.com
Sat Oct 25 00:50:33 BST 2014


Hello Fábio,

The typical practice for C parsers is to have the C pre-processor (CPP) expand all pre-processor directives (#include, #define, etc.) before sending the result to the C parser itself. There are some parsers that interleave pre-processing and C parsing, but they’re not very common. The parser in language-c follows the more common process and depends on an external pre-processor.

However, the Language.C.parseCFile function will do all the work for you, so you don’t need to run the pre-processor yourself. You can see an example of using this function here:

    http://hackage.haskell.org/package/language-c-0.4.6/docs/Language-C.html

Aaron

> On Oct 24, 2014, at 8:25 AM, Fábio Sousa <fabioestevessousa at gmail.com> wrote:
> 
> The parser is not capable to parse the #define?????
> 
> _______________________________________________
> Language-c mailing list
> Language-c at projects.haskell.org
> http://projects.haskell.org/cgi-bin/mailman/listinfo/language-c




More information about the Language-c mailing list