[antlr-interest] Error output from org.antlr.Tool with language=Python, but generates code OK

Jim Idle jimi at temporal-wave.com
Sat Sep 25 14:22:01 PDT 2010


You have no lexer rules. It is just a syntax error in your .g file. These
will be better reported in ANTLR 4

Jim

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Arthur Perry
Sent: Saturday, September 25, 2010 11:13 AM
To: antlr-interest at antlr.org
Subject: Re: [antlr-interest] Error output from org.antlr.Tool with
language=Python, but generates code OK

I am getting the same error - did you ever figure out the issue?

Art


> ---- bernt wrote: ----
>
> When executing the command:
>
> java -cp antlrworks-1.2.2.jar org.antlr.Tool Expr.g
>
> on a minimal Expr.g file (and any other grammar file with
language=Python):
> ---
> grammar Expr;
> options {
>        language=Python;
> }
>
> prog:;
> ---
>
> the following happens:
>
> - the tool exits with error code 1, and writes an error message to the
console:
> ANTLR Parser Generator  Version 3.1.1
> error(10):  internal error: eval tree parse error : <AST>:0:0:
> unexpected AST node:
>
> org.antlr.stringtemplate.language.ActionEvaluator.expr(Unknown Source) 
> ...
> ...
> org.antlr.Tool.main(Unknown Source)
>
> - but the ExprParser.py file is generated just fine.
>
>
> Is there something wrong in org.antlr.Tool? Or am I doing something wrong?
>
> Regards,
> Bernt
>

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