[antlr-interest] -debug option with C code
Ramanand
ramanand_mandayam at yahoo.com
Tue Aug 30 19:41:50 PDT 2011
Hi
I am using ANTLR v3.4 to generate a parser in C. The generated grammar
compiles with no problems on my Linux machine with GCC.
When I use the -debug option then ANTLR adds a whole bunch of location
tracking information such as DBG->location(DBG, M, N).
I am guessing that the M and N are line number and column number
respectively.
However the very first call to the DBG->location function for every
terminal in the grammar is missing the 3rd parameter.
The output file contains the call as
DBG->location(DBG, M, ) // notice that N is not printed in the
generated C file.
However the function call seems to be correctly printed for nested
syntactical constructs on the right hand side of a production/rule.
Is the -debug option not fully supported in ANTLR v3.4 with C target?
Cheers
Ramanand
More information about the antlr-interest
mailing list