[antlr-interest] ANTLR 3 matching an exact number or bounded number of items
The Researcher
researcher0x00 at gmail.com
Wed Mar 2 18:09:08 PST 2011
Does ANTLR 3 have built-in support for matching an exact number or bounded
number of items that does not rely on using {...}?=>
e.g for a 32 bit value of four bytes the rule statement would be
byte[4]
or for an a structure that has a bound of elements between 1 and 16 the rule
statement would be
struc[1:16]
While ANTLR 3 uses [ ] for rule parameters, here [ ] is used to signify
element bounds.
I have looked high and low for this, and found nothing tangible.
Abusing {...}?=> works, but I would like to stop abusing it.
More information about the antlr-interest
mailing list