[antlr-interest] Possible problem with lists after upgrade to 3.1

Foust javafoust at gmail.com
Wed Aug 13 23:47:36 PDT 2008


Ter,

Did you only fix it for the += operator and not =  ?

Using today's build (listed below), there is still a compatibility issue
using one label for two different rules. Is this a different issue?

	expr : (t=a | t=b) c[$t.attr]?;

The resulting Java code won't compile, since "t" is defined as the last type
encountered, in this case "b":

        MyGrammar.b_return attr = null;

	later,
		case 1: ...
			attr=a();		// error: Type Mismatch
			...
		case 2: ...
			attr=b();		// compiles
			...
Brent

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Terence Parr
> Sent: Wednesday, August 13, 2008 10:07 AM
> To: Grzegorz Cieslewski
> Cc: antlr ANTLR
> Subject: Re: [antlr-interest] Possible problem with lists after upgrade
> to 3.1
> 
> Grab new antlr daily build:
> 
> antlr-2008-08-13.10.tar.gz
> 
> Fixed.
> 
> Ter



More information about the antlr-interest mailing list