[antlr-interest] Changing whitespace significance in the grammar

Paul J. Lucas dude at darkfigure.org
Sun Nov 3 23:11:03 PST 2002


I read about ignoring whitespace in the lexer, but it's not what I need.  If I have a language where whitespace is permitted most places, e.g., between keywords, before and after parentheses, etc., but NOT in a select few places, e.g., between the "</" and the element name in an HTML close-tag, how can I express this in the grammar (not the lexer) without having to put (WS)? peppered all over the grammar except where whitespace is not permitted?

There doesn't seem to be an option for a grammar rule about controling significance of whitespace.

- Paul


 

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



More information about the antlr-interest mailing list