[antlr-interest] specific number of repetitions

Brian Lewis bsl04 at uark.edu
Sat Mar 10 22:47:21 PST 2007


I want to parse something that looks like
4:abcd5:12345

so I want to code something like
field:
  n=integer ':' ('a'..'z' | '0'..'9'){n}

to read exactly n characters after the :. I don't know how to do it,
though. Is there a way?


More information about the antlr-interest mailing list