[antlr-interest] translation of $x references in v3.0
Scott Stanchfield
scott at javadude.com
Sun May 1 14:23:19 PDT 2005
> Come to think of it, I would suggest considering
>
> @id = ID
> Instead of id = ID in your example.
> > [from Ter's post]
> > a[String s, int x] returns [float y]
> > : id=ID f=field {$s, $x, $y, $id, $f.z;}
> > ;
I like that... Makes it easier to read which is a rule or token ref...
I'd agree with $ being a problem as well... But @ is a problem for the same
reason (perl, for example).
Sounds like we should let the specifiers be, uh, specified:
options {
referencePrefix="$";
pluginPrefix="@";
}
(the defaults?)
or
options {
referencePrefix="%";
pluginPrefix="~";
}
Thoughts?
-- Scott
More information about the antlr-interest
mailing list