[antlr-interest] A rule can be mutually left-recursive with itself?

Jeremy Sheldon Jeremy.Sheldon at 90degreesoftware.com
Fri Sep 28 14:06:39 PDT 2007

>It would probably be easier to explain if you posted the rule it 
>was complaining about.

Here's the error message:

[14:00:29] Aborting because the following rules are mutually

Now, there are two rules listed there, but always in the past, the form
of the error message would be something like the following:

[14:00:29] Aborting because the following rules are mutually
    [table_reference, foo, bar]

This leads me to believe that table_reference and non_join_query_term
are not mutually left-recursive with each other.  Would this assumption
be correct?

Here are the rules themselves:

	: table_name  correlation_specification?
	| derived_table correlation_specification
	| (table_reference CROSS JOIN table_reference
	| table_reference NATURAL? join_type? JOIN table_reference
	| LEFT_PAREN joined_table RIGHT_PAREN);

        : (non_join_query_term | joined_table) INTERSECT ALL?
corresponding_spec? query_primary
        |  non_join_query_primary;

Thanks again,

More information about the antlr-interest mailing list