[antlr-interest] translation of $x references in v3.0

Loring Craymer Loring.G.Craymer at jpl.nasa.gov
Mon May 2 12:45:23 PDT 2005


Ter--

To the user, having two special characters converts the simple question of 
"what is a.b.c.d" to "Should I write $a.b.c.d or @a.b.c.d here?  For that 
matter, what is $a.b.c.d and how does it differ functionally from 
@a.b.c.d?  And what is @a.b.c.d, anyway?"  Unless these are used in wildly 
different ways--which seems inconceivable except as a design failing--the 
user should only have to worry about one consistent interface to data 
(attributes).

Since you are solving the a versus #a problem, I don't think that it makes 
sense to introduce a similar but more extreme problem.

--Loring

At 11:38 AM 5/2/2005, Terence Parr wrote:

>On May 1, 2005, at 3:37 PM, Matthew Ford wrote:
>
>>I agree with Loring, and vote for just one prefix.  (the backwards
>>compatible switch sounds good too)
>>matthew
>>
>>>In fact, I'd vote against having more than one special character
>>>for attributes in actions:  the only feature it provides the user is to
>>>allow duplicate use of names and it complicates the translation mechanism
>>>for the ANTLR backend developer.
>
>Hi Matthew,
>
>My logic is that dynamic attributes are such different critters than 
>regular args/return-values/labels attributes that they should be clearly 
>marked syntactically as different.  I use the "what is a.b.c.d?" argument 
>in Java as a case in point.  That could be any number of things.  We'll 
>try it out this Summer and then back it out if everyone hates it. :)
>
>Ter
>--
>CS Professor & Grad Director, University of San Francisco
>Creator, ANTLR Parser Generator, http://www.antlr.org
>Cofounder, http://www.jguru.com




More information about the antlr-interest mailing list