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}

What I am expecting to find in the input is a numerical value (which Ive
labeled count), followed by as many numerical values as the value of count.

Examples of valid input:

3 10 12 15
2 6 9

Examples of invalid input:

3 10 12
2 4 5 6


This seems like a trivial message protocol situation, so I'm hoping this is
a solved problem.

Ive gone through The Definitive Antlr Reference, and can't find information
on quantifiers that would help me solve this issue.

Ideas? guidance?

Thanks very much in advance.

-- 
Alejandro Lujan

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to il-antlr-inter...@googlegroups.com.
To unsubscribe from this group, send email to 
il-antlr-interest+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to