On 03/05/11 01:48, Dale Schumacher wrote:
> Was http://bit.ly/iVXPEJ+ sufficiently clear?  Are there any problems
> you see with it?
> 
> Are there cases of left-recursion which are not amenable to the
> iteration/accumulator approach?

Refactoring to remove left-recursion is always possible, but sometimes
inconvenient. It's most inconvenient when your specification is an existing
grammar that uses left-recursion heavily, since it obscures the relation
to that grammar and is an opportunity to introduce mistakes.

Such mistakes are more likely where the refactoring interacts with
nontrivial actions or predicates (especially ones that need to access
parser state), than for straightforward language recognition. It can
get particularly hairy when the language is not quite context-free and
you've needed to do something complicated to work around that, and
there is a left-recursion problem in the same rule(s).

-- 
David-Sarah Hopwood ⚥ http://davidsarah.livejournal.com

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
PEG mailing list
[email protected]
https://lists.csail.mit.edu/mailman/listinfo/peg

Reply via email to