[antlr-interest] V3: possible bug - whitespace at the beginning of a line causes error?

Mark Mandel mark.mandel at gmail.com
Sun Jan 28 21:26:55 PST 2007


Hey,

Before I make a test bed, I just wanted to see if anyone else has
encountered this issue:

If I have a line that reads a line such as:

"select from basic"

it parses fine

if I have one that reads:

"   select from basic"

I get a mismatched character error on my parser.

This is actually quite possible with the input I recieve.

All whitespace is hidden in my grammar, so I'm a little confused.

WS  	:
		(' '|'\r'|'\t'|'\u000C'|'\n') {$channel=HIDDEN;}
    	;

Is this possibly a bug? Or do I need to look deeper into my grammar?

Mark
-- 
E: mark.mandel at gmail.com
W: www.compoundtheory.com


More information about the antlr-interest mailing list