[antlr-interest] ANSI C grammar for ANTLR v3: compilation problem with versions higer than 3.0.1

Jim Idle jimi at temporal-wave.com
Tue Jul 8 14:55:16 PDT 2008


On Tue, 2008-07-08 at 12:10 +0200, Tired Ofsubscriptions wrote:

> Hi!
> 
> I am trying to compile ANSI C grammar for ANTLR v3 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;
>             ^



> =========================================
> 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?


In the source .g file, is this:

$channel = 99;

Or is it explicitly using channel?

These days this should be:

$channel = HIDDEN;

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080708/018ae8ce/attachment.html 


More information about the antlr-interest mailing list