[antlr-interest] Re: Parsing beginners question
jenlhunt2003
steam at tapisinc.com
Wed Jan 28 11:19:20 PST 2004
I tried adding those options like so:
java -classpath %CLASSPATH% antlr.Tool -trace -codeGenBitsetTestThreshold=999999 $(InputPath),
which I ran on the StdCParser.g file.
The only difference that I see is that I now have a bunch of Tracer TraceInOut() calls in the .cpp file,
which I assume was due to the -trace flag. What should the effect of the 999999 flag be,
and where should I see it?
Also, if you have a moment, could you tell me what the Bitset thing is all about?
In going through source the StdCParser.cpp file last night I noticed several _tokenSet_* arrays containing
unsigned long quantities that I didn't understand. Are these related to the Bitset's you are referring to?
Thanks for your help!
Henry
--- In antlr-interest at yahoogroups.com, mzukowski at y... wrote:
> You can use the option codeGenBitsetTestThreshold = 999999; in order to turn
> off the bitset generation and be able to see the actual tokens it is trying
> to match. Also, have you run it through antlr with the -trace option? That
> could help with debugging too.
>
> Actually you do need that syntactic predicate ": ("typedef" | declaration)=>
> declaration". The parser doesn't know if it is looking at a declaration or
> definition until it sees the semicolon which can be very far (undefined,
> unbounded length) into the file.
>
> Monty
>
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list