[antlr-interest] Comments/newlines

Sohail Somani sohail at taggedtype.net
Tue Sep 27 22:10:38 PDT 2005


How would you define a lexer to tokenize the following so that the
grammar rules use EOL?

x = y // some comment
// some comment
x = y

I want to parse both obviously language statement as IDENTIFIER EQ
IDENTIFIER EOL

I hope this makes sense!

Thanks

Sohail



More information about the antlr-interest mailing list