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

Grzegorz Cieslewski cieslewski at hcs.ufl.edu
Thu Sep 4 09:26:09 PDT 2008


Just a follow up on the Brent's comment.
I tried and I get similar errors with = operator as I used with += (I
used 2008-09-03 build)
For example:
(listA=number | listA=id) -> ^(EXPR $listA)

Does not want to compile:
found   : G4Parser.number_return
required: G4Parser.id_return
                  listA=number();

Greg




On Thu, Aug 14, 2008 at 2:47 AM, Foust <javafoust at gmail.com> wrote:
> 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
>
>



-- 
=====================================================
Grzegorz Cieslewski
Research Assistant
High-performance Computing & Simulation (HCS) Research Laboratory
University of Florida, Dept. of Electrical and Computer Engineering
330 Benton Hall, Gainesville, FL, 32611-6200
Phone: (352) 392-9041
Email: cieslewski at hcs.ufl.edu
Web: www.hcs.ufl.edu
=====================================================


More information about the antlr-interest mailing list