[antlr-interest] Comments/newlines

Sohail Somani sohail at taggedtype.net
Tue Sep 27 22:19:12 PDT 2005


Apologies if this is a repost.

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