Lexical Analysis in GCC for C language

1.3k Views Asked by At

I am looking for the lexical analyzer code in GCC for C language but unable to find. I found lex.c but the comment inside the file says it works for C++.

Please provide any link(If available) which can help.

1

There are 1 best solutions below

0
On

The parser is reading a stream of tokens from the preprocessor, in directory libcpp/

Read the documentation and slides available on the GCC resource center (IIT Bombay, India)

If you wish to extend GCC, consider using MELT

BTW, use a more recent version of GCC, e.g. 4.9