[antlr-interest] ANSI C grammar for ANTLR v3: compilation problem with versions higer than 3.0.1
Johannes Luber
jaluber at gmx.de
Tue Jul 8 03:18:21 PDT 2008
Tired Ofsubscriptions schrieb:
> Hi!
>
> I am trying to compile **ANSI C grammar for ANTLR v3*
> <http://www.antlr.org/grammar/1153358328744/c.g>* with newer versions (>
> 3.0.1) of ANTLR.
> There is a problem in the generated lexer file when I compile my user
> program:
> ==============================
> ===========
> CParserLexer.java:2942: cannot find symbol
> symbol : variable channel
> location: class CParserLexer
> channel=99;
> ^
> CParserLexer.java:3003: cannot find symbol
> symbol : variable channel
> location: class CParserLexer
> channel=99;
> ^
> CParserLexer.java:3077: cannot find symbol
> symbol : variable channel
> location: class CParserLexer
> channel=99;
> ^
> CParserLexer.java:3150: cannot find symbol
> symbol : variable channel
> location: class CParserLexer
> channel=99;
> ^
> =========================================
> I tried it with versions antlr-3.1b1 and antlr-2008-06-26.17.
>
> Should I change something in the grammar file to adapt it to newer
> version or is it a bug in the antlr code?
>
> Thanks for help,
> Vlad
channel has been moved into a RecognizerSharedState object. I believe
this object is called state, but I'm not sure about this. Effectively,
you have change channel into state.channel.
Johannes
More information about the antlr-interest
mailing list