> >At k=1 (and when encountering loops, the lexer always behaves like it's k=1), these rules are mutually ambiguous. You should merge them into a single rule with appropriate lookahead disambiguation. You are right, there is a problem here. And it is not the only one - in ANTLRv2, the lexer had a k=3. Regards, a.