[antlr-interest] ANTLR 1.4 Issue
Victor Giordano
power_giordo at yahoo.com.ar
Tue Aug 17 21:10:22 PDT 2010
Hi There Guys!. I QUick one this time:
I found something very strange, with the $ reference to label when
querying about the existence of that "conditional" label.
(I Copy paste the code)
grammar Issue;
base returns [Object ret]
@after
{
if ($label!=null); <-- DOESN'T WORK
if (label!=null); <-- WORKS!
}
: label=rule1 ';';
rule1 returns [String value]
: ID {$value=$ID.text;};
ID : ('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'0'..'9'|'_')*
;
WHY... i just don't kwow... i guess is an issue or maybe i am doing
something from, but in the book of ANTLR from the author a see cleary
the example that's isnt working...
Well only that!.
More information about the antlr-interest
mailing list