[antlr-interest] Fwd: "Exotic" grammar rule

Christian Lerch christian.lerch at km-works.eu
Tue Apr 24 01:53:26 PDT 2012


On some other website I found the following interesting ANTRL grammar rule:

onestar
     :    ( { input.LA(2) != STAR }?  ( STAR )?)
     |
     ;

Can anybody explain its precise meaning to me?

Cheers,
Chris




More information about the antlr-interest mailing list