[antlr-interest] translation of $x references in v3.0
John D. Mitchell
johnm-antlr at non.net
Mon May 2 13:36:07 PDT 2005
>>>>> "Loring" == Loring Craymer <Loring.G.Craymer at jpl.nasa.gov> writes:
[...]
> 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).
One reason is that this makes it harder to accidentally use those dangerous
dynamic attributes by accident. Which, I believe was part of your argument
for not building them into Antlr v3 in the first place. Geez.
@x.y are always, only dynamic attributes.
$i are always, only the various local, statically-scoped variables.
Take care,
John
More information about the antlr-interest
mailing list