[antlr-interest] antlr 2.7.6: newbie question - getting the last matched token

Costa Basil costa_basil at yahoo.ca
Tue Aug 8 00:47:52 PDT 2006


How can I get the last matched token? I have the following case:

 (T1 | T2 ... | Tn) { action }
where Ti are terminals. In my action I want to get the token that was matched and I don't want to declare labels to each of the tokens because it is too cumbersome. Also for whatever reason, antlr doesn't let me use identical labels for each alternative.

Thanks


 		
---------------------------------
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot with the All-new Yahoo! Mail  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060808/4a9dfbf8/attachment.html


More information about the antlr-interest mailing list