[antlr-interest] Expr example in Wiki compile error Eclipse using ANTLRworks 1.0b8, ANTLR 3.0b5
Terence Parr
parrt at cs.usfca.edu
Sat Dec 16 11:08:44 PST 2006
Hi Bill...sorry about that...try grabbing latest from depot browser,
fixed after 3.0b5.
I hope to do another release soon.
Ter
On Dec 16, 2006, at 10:52 AM, Foolish Ewe wrote:
> I've tried getting some my stuff working ANTLR source code into
> eclipse, by
> adding the ANTLRworks 1.0b8 jar to my class path, and using
> ANTLRworks to generate
> the Java source and compile it in the Eclipse framework.
>
> The generated code had compiler errors, (as did my much larger
> example) for the following
> ANTLR source line:
> | '(' expr ')' {$value = $expr.value;}
>
> The action $value=$expr.value; generates the following Java source
> (which does not compile):
>
> value = $expr.value;
>
> Which does not compile.
>
> I've noticed in my own source that I've had to create attribute
> labels in order
> to get compilable code out of ANTLR1.0b5 (via ANTRLworks 1.0b8),
> so changing the ANTLR source to read:
>
> | '(' myexpr=expr ')' {$value = $myexpr.value;}
>
> generates the following Java source (which does compile):
>
> value = myexpr;
>
> Does anyone have any idea why the published example in the wiki
> isn't building
> in this environment?
>
> Regards:
>
> Bill M.
>
> _________________________________________________________________
> View Athlete’s Collections with Live Search http://
> sportmaps.live.com/index.html?source=hmemailtaglinenov06&FORM=MGAC01
>
More information about the antlr-interest
mailing list