> From: Damian Conway [mailto:[EMAIL PROTECTED]] Sent: 2002/03/21 00:19 > Yves wrote: > > A really excellent summary of the various classes of parser > and why RecDescent > doesn't quite fit in any of them. Thanks, Yves.
Cheers. And there I was expecting to get slammed for some subtlety. :-) > When Parse::RecDescent encounters something like this > it should error > (its documented that it will, but I haven't checked)... > > It definitely does. I assumed that it did. > > ...as it will go into an endless loop on the 'expr' > rule. Unfortunately > however TheDamian hasnt implemented multi level left > recursion checking... > > Oh, yes he has! RecDescent does a complete graph traversal > looking for n-ary > left-recursion loops and fails to compile the grammar if it finds any > left-recursive loop involving any number of rules. It has > done this since its > earliest versions. Doh! My confusion comes from misremembering (really must learn to double check _anything_ I think I remember) the following: (from P::RD documentation) More subtle forms of left recursion (for example, through the second item in a rule after a ``zero'' match of a preceding ``zero-or-more'' repetition, or after a match of a subrule with an empty production) are not found. Apologies, and Ill update the node as well. Cheers, Yves