Left recursion
1 posts in topic
Flat View  Flat View

Posted By:   Tim_Davis
Posted On:   Tuesday, September 21, 2004 12:54 PM

Does ANTLR support grammars that use left recursion?

Re: Left recursion

Posted By:   Anonymous  
Posted On:   Friday, December 3, 2004 01:49 AM

If you have a left recursion like

B : A;
A : A X | Y;

you can rewrite it as

B : Y (X)*

This is usually much clearer than using recursion, anyway.


Harald M.

About | Sitemap | Contact