[antlr-interest] Return Values
Philip Mötteli
Philip.Moetteli at tele2.ch
Sat May 14 15:09:38 PDT 2011
Hi,
I know, how to access a return value from a parser rule/token: By calling "$rule.returnValue". E. g:
parserRule0 : parserRule1
{ DoSomethingWithTheReturnValue($parserRule1.returnValue); }
;
But how do I access the return value, if it's one of several options ('or'ed together):
parserRule0 : aParserToken=( parserRule1 | parserRule2 | parserRule3 )
{ // How do I access "$aParserToken.returnValue"? }
;
Thanks for any help
More information about the antlr-interest
mailing list