[antlr-interest] Protocol message recognition - an amateur grammar question

Micha micha-1 at fantasymail.de
Wed Jan 12 08:21:33 PST 2011


Am 12.01.2011 17:02, schrieb Alex Lujan:
> I am trying Antlr v3 for message recognition, which must comply to a custom
> define protocol.
> 
> I find myself unable to express the following rule (written in a
> non-standard notation):
> 
> data: count number{count.value}
> 


just parse the lines as
data: number+ { check(); }
and then check in an action if the first number is correct.

 Michael


More information about the antlr-interest mailing list