[antlr-interest] new line processing

richardhensley99 richard.hensley at mckesson.com
Fri Aug 30 08:26:36 PDT 2002

I have a case where a newline is ignorable whitespace at times, and 
the end of a command at times. Specifically, I'm trying to parse a 
file that is valid for Oracle SQLPLUS. The file includes SQL commands 
that end with a semicolon or slash. The file also contains SQLPLUS 
commands which terminate with a NEWLINE.

I'm not real sure what the solution is. Do I need to always kick a 
new line out of the lexer and deal with it in the parser, or can I 
only kick the new line out when I known I'm in an SQLPLUS command.

SQL commands are things like "create", "drop"

SQLPLUS commands are things like "set", "execute", "whenever"

The keywords that used in the two command sets are different. 


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

More information about the antlr-interest mailing list