Howdy there!
I apologize in advance if this question is too simple or has been
answered before. Is it possible to specify minimum and maximum token
length for antlr tokens? For example, how can you restrict a token to
be between 3 and 7 characters long? I've tried using token
"[a-z]\{3,7\}" and "[a-z]{3,7}" in pccts 1.33 to no avail. The only
solution that I see at the moment is looking at zzlextext, but that's
already too late for my application (I'd like to get a misparse
exception after 7th character).
Thank you in advance for any advice or pointers on this problem. Either
Antlr version (1.33 or 2.7.3) is ok.
Sincerely,
Artie