[antlr-interest] Please, help to write a tree walker

John B. Brodie jbb at acm.org
Mon May 24 06:26:06 PDT 2010


Greetings!

I am unable to compile your combined grammar.

On Mon, 2010-05-24 at 12:55 +0400, Ламер wrote:
> STRING_LITERAL
>         :       '"'
>                 { StringBuilder b = new StringBuilder(); }
>                 (       c=~('"' | '\r' | '\n'/* | VARIABLE*/)
> { b.appendCodePoint(c); }
>                 )*
>                 '"'
>                 { "\"" +setText(b.toString()) + "\""; }
.................^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>         ; 

not a valid Java statement.....




More information about the antlr-interest mailing list