[antlr-interest] Again Infinite recursion on SQL table_ref
<-> join_table
Ruslan Zasukhin
sunshine at public.kherson.ua
Fri Aug 30 11:25:16 PDT 2002
on 8/30/02 20:12, John B. Brodie at jbb at acm.org wrote:
> The last two rules do not correctly capture the facts that at least 1
> "join" is required for a joined_table and is optional in a
> table_reference. But maybe this doesn't really matter, would need to
> analyze the usage of the joined_table and table_reference rules in the
> rest of your grammar.
>
> Bogdan's solution appears to be better, with the addition of a rule
>
> joined_table : primitive_element ( "join" primitive_element )+ ;
>
> to his rules, which are
>
> primitive_element
> : table_name // IDENT
> | subquery // '(' query ')'
> ;
>
> table_reference
> : primitive_element ( "join" primitive_element )*
Good point.
Thank you John.
--
Best regards,
Ruslan Zasukhin [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com
To subscribe to the Valentina mail list
send a letter to valentina-on at lists.macserve.net
-------------------------------------------------------------
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list