[antlr-interest] tool for left recursion removal
Eric Mahurin
eric_mahurin at yahoo.com
Sat Oct 29 14:37:48 PDT 2005
Hey all, even though I haven't used ANTLR in about a year or
so, I still take inspiration from it. I ended up designing my
own LL(1/infinite) parser in Ruby and I started with ideas from
ANTLR. Unlike other parsers, you specify the grammar directly
in the target language so that integration with logic outside
the grammar is easy. The same techniques could be applied to
any other OO language, but it would be better if the language
had operator overloading and closures (Java has neither).
Here's a link if anyone is interested:
http://rubyforge.org/projects/cursor/
Anyways, back to my real question. Like other LL parsers, the
big problem is dealing with grammars that have left-recursion.
I found many links on the techniques to remove left-recursion.
But, what I would really like is some tool that took a grammar
(.y file maybe), removed the left-recursion, and spit out a new
grammar (also a .y file). Maybe also did left factoring.
Anybody know of something that does this?
Eric
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the antlr-interest
mailing list