[antlr-interest] Collecting chars in the lexer

Jim Crafton jim.crafton at gmail.com
Sun Oct 23 20:31:46 PDT 2005


I have the following rule in my lexer

Pragma
	:	('#' "pragma" (~('\r' | '\n'))* EndOfLine)
		{_ttype = ANTLR_USE_NAMESPACE(antlr)Token::SKIP; newline();}
	;

As I understand it, this means the lexer will skip everything till the
first newline char. How would I collect this text anyways, for
parsing/analysis done by some other method?


More information about the antlr-interest mailing list