[antlr-interest] Pattern to macth if no other match
Mats Ekberg
mats.ekberg at arcticgroup.se
Wed Dec 24 06:35:34 PST 2008
I want to have one action being executed if no patterns match, like:
stat:
'SWAP' { fh.swap();}
| 'DROP' { fh.drop();}
| <default>{ fh.print(text);}
on SWAP fh.swap() gets executed.
on DROP fh.drop()
and if no match i want fh.print() be called with the text that did not match anytihng else.
Can someone help me wit hthis one?
/mats
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20081224/6cf78a77/attachment.html
More information about the antlr-interest
mailing list