[antlr-interest] Re: sql parser
mzukowski at yci.com
mzukowski at yci.com
Wed Jan 28 10:50:49 PST 2004
Look for the same pattern of matches over and over, that would be your loop.
Monty
-----Original Message-----
From: William Lam [mailto:xeenman at yahoo.com]
Sent: Wednesday, January 28, 2004 10:21 AM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] Re: sql parser
I recompiled my grammar, and now I see output. I can't make much
sense of the output, except that I see my grammar rules. What should
I be looking for? Should I be looking out for sections that have
many guesses?
wil
--- In antlr-interest at yahoogroups.com, mzukowski at y... wrote:
> 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 y...]
> 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/
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