[antlr-interest] Java parser not compiling

Eric researcher0x00 at gmail.com
Thu Mar 15 07:56:41 PDT 2012


Hi Robin,

It is a know bug. Ter fixed it then backed it out.

See:
http://antlr.markmail.org/search/?q=%22void+%3D+null%3B%22#query:%22void%20%3D%20null%3B%22+page:1+mid:wr44syoliwmy6ors+state:results

You can use http://antlr.markmail.org/ to search previous post at
antlr.orglist.

For your question I used "void = null;"

Not what you wanted, but it is an answer.

Try using 3.3.

Eric

On Thu, Mar 15, 2012 at 8:19 AM, Robin <diabeteman at gmail.com> wrote:

> Hello list,
>
> I'm trying to use this grammar
> http://www.antlr.org/grammar/1207932239307/Java1_5Grammars with antlr-3.4
>
> The grammar compiles into java classes without problems:
>
> $ java -cp /c/integ/antlr/antlr-3.4-complete.jar org.antlr.Tool Java.g
> $ ls -l *.java
> -rw-r--r--    1 S0030382 Administ     159k Mar 15 11:15 JavaLexer.java
> -rw-r--r--    1 S0030382 Administ     1.0M Mar 15 11:15 JavaParser.java
>
>
> But the generated parser has compile errors:
>
> $ javac -cp antlr-3.4-complete.jar JavaParser.java
> JavaParser.java:23842: illegal start of expression
>        void  =null;
>        ^
> 1 error
>
>
> I guess the grammar must be updated in order to work with antlr 3.4.
>
> Can you tell me what must be done?
>
> Thanks in advance :)
> Robin
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
>


More information about the antlr-interest mailing list