[antlr-interest] sql parser

mzukowski at yci.com mzukowski at yci.com
Tue Jan 27 14:23:26 PST 2004


Run antlr.Tool with -traceParser and then have a look to see where your loop
is.

Monty

-----Original Message-----
From: William Lam [mailto:xeenman at yahoo.com] 
Sent: Tuesday, January 27, 2004 10:39 AM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] sql parser

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/ 


 

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