Hi, I need to match in ANTLR a message containing 2 fields separated by a / First field can have 1..3 digits, second field can have 1..2 digits
this does not work
msg: f1 '/' f2;
f1: DIGIT(DIGIT(DIGIT)?)? ;
f2: DIGIT(DIGIT)?
- How can I avoid ambiguity in such a case?
- Is there a more elegant way to express the number of repetitions in ANTLR?
Thanks a lot Chris