[antlr-interest] Newbie question

Patrick LeBoutillier patrick_leboutillier at hotmail.com
Thu Nov 15 08:42:54 PST 2001


Hi all,

I'm new to ANTLR and to the world of lexers/parsers in general.
I read up on the documentation and I have a pretty good feel of what
the lexer does and what the parser does. I have a question though:

Suppose I'm parsing Java source code. What I want to do is distinguish 
between white space that is used as indentation and whitespace that is in 
between other types of tokens. Indentation should be returned as a special 
token type, say INDENT, while other whitespace can be ignored.

Is it possible to do this (even though it might not be very useful)?

Thanks a lot,

Patrick
-------------------------
Patrick LeBoutillier
Laval, Quebec, Canada

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list