0

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.

anuj pradhan
  • 2,777
  • 4
  • 26
  • 31

1 Answers1

2

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

Basile Starynkevitch
  • 223,805
  • 18
  • 296
  • 547