[antlr-interest] Finding errors

Steven Kibler skkibler at earthlink.net
Mon Oct 18 00:25:47 PDT 2010


I have a very simple grammar compiled in C++ and an input file to match.
The parser starts up, goes into the body and immediately returns without
producing any errors that I can see.  The generated C code has a lot of
macros in it which make debugging extremely difficult to find out what the
problem is.

 

Questions:

  How does one examine the tokens returned from the lexer?

  How can one trace what is happening in the parser?

  How does debug work?  I occasionally see debug code in the generated
sources but haven't determined how to do it consistently or what to do with
it when it gets generated.

  What tools are available for tracking down some of the lexer/grammar
issues?

 

I am most interested in where to find the answers than the answers
themselves.

 

Steven Kibler

 

 



More information about the antlr-interest mailing list