Well, I know it's possible to rewrite the grammar to eliminate left recursion. But this is a very boring process, and sometimes it's very nontrivial to keep correct associativity. Is there any parser capable to handle properly grammars with left recursion?
Asked
Active
Viewed 1,109 times
5
-
AFAIK, by definition, a PEG can't cope with left recursion. – Bart Kiers Dec 09 '10 at 13:02
-
2http://portal.acm.org/citation.cfm?id=1328424 – SK-logic Dec 09 '10 at 13:08
-
@SK-logic, but can Packrat-parsers be called PEG's? (a genuine quiestion, not being a smart-@ss :)) – Bart Kiers Dec 09 '10 at 13:13
-
Well, Packrat is just a one of many ways of parsing PEGs. There is no defined operational semantics for PEG, so it's ok to call Packrat a decent implementation of it. – SK-logic Dec 09 '10 at 13:15