[antlr-interest] sql parser

William Lam xeenman at yahoo.com
Tue Jan 27 10:38:48 PST 2004


Hi,

I am writing a sql parser similar to the Microsoft SELECT example on 
the antlr website.  I have a very complicated query (several pages) 
that just hangs the parser.

It has many sql IN statements
i.e.

SELECT 1 FROM bar WHERE foo IN (SELECT 1 FROM bar WHERE foo IN ( ... 
etc etc etc)

so the IN clause can go on forever

The main grammar of the IN clause is

IN LPAREN (
                (selectStatement) => selectStatement
              | expression (COMMA expression)*
              ) RPAREN

the syntatic predicate is needed because both the selectStatment & 
expression rule can start with a LPAREN

any ideas?

wil


 

Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/antlr-interest/

To unsubscribe from this group, send an email to:
 antlr-interest-unsubscribe at yahoogroups.com

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




More information about the antlr-interest mailing list