>> what exactly is wrong with this grammar? >> >> lines : line (NEWLINE line)*; >> line : '\u0020'..'\u007F'*; >> NEWLINE : '\r'? '\n'; > > The range operator works differently inside a parser-rule. > For example, the rule foo: > > foo > : A..C > ; > A : 'a'; > Z : 'z'; > C : 'c'; > > will match one of the tokens A, Z or C (not one of the characters 'a', 'b' > or 'c'!).
i also noticed that following works just fine: lines : line (NEWLINE line)*; line : CHAR*; NEWLINE : '\r'? '\n'; CHAR : '\u0020'..'\u007F'; is there a way i can make a rule token is a sequence of values as opposing a sequence of tokens? List: http://www.antlr.org/mailman/listinfo/antlr-interest Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address -- You received this message because you are subscribed to the Google Groups "il-antlr-interest" group. To post to this group, send email to il-antlr-inter...@googlegroups.com. To unsubscribe from this group, send email to il-antlr-interest+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/il-antlr-interest?hl=en.