[antlr-interest] "An Introduction to ANTLR" presentation slides
Gavin Lambert
antlr at mirality.co.nz
Wed Feb 27 12:33:35 PST 2008
At 09:14 28/02/2008, Darien Hager wrote:
>// This is wrong, but is what is implied from regex experience
>with +*? modifiers.
>data: BYTE{0,4}; // 0 to 4 BYTE tokens
>
>The slide example is valid v3 code, correct? Is there a clearer
>way to match tokens or other rules an arbitrarily-ranged number
>of times?
Well, you could always use:
data: (BYTE (BYTE (BYTE BYTE?)?)?)?;
More information about the antlr-interest
mailing list