[antlr-interest] tool for left recursion removal
Terence Parr
parrt at cs.usfca.edu
Mon Oct 31 12:35:48 PST 2005
On Oct 31, 2005, at 5:16 AM, Eric Mahurin wrote:
> On 10/31/05, Terence Parr <parrt at cs.usfca.edu> wrote:
>
> On Oct 30, 2005, at 6:58 AM, Eric Mahurin wrote:
>
> > Before I continue too far off topic (and give another plug for
> > my own LL parser), I'll ask again: anybody know of any software
> > for doing left-recursion removal?
>
> Hi. New version of http://www.antlr.org/works/index.html does left
> recursion removal :)
>
> Ter
>
> Thanks Terrance! I just downloaded this and it worked great!
> Istarted with some yacc grammar, stripped out all the surrounding
> code, read it into antlrworks, asked it to remove all left
> recursion, and it looks like it did the right thing! I'm not sure
> about actions, but what it did to the grammar looks right.
>
> Would you consider having this left recursion removal as a stand-
> alone command-line tool? What you have now is a great start at
> converting LR grammar (yacc file) to LL grammar. How about trying
> to do full conversion?
>
> - removing left recursion
> - left factoring
> - use precedence info to generate expression rules for each level
That is exactly what I hope to build (and integrate into
antlrworks). :) Jean's left-factoring is one of the steps...
Ter
More information about the antlr-interest
mailing list