On Wed, Apr 13, 2011 at 10:26:14AM -0700, Terence Parr wrote:
> On Apr 12, 2011, at 12:31 PM, Laurence Tratt wrote:
> > On Tue, Apr 12, 2011 at 08:47:42AM -0700, Terence Parr wrote:
> > 
> > Dear Terence,
> > 
> >> Only limitation is immediate-left-recur handled only.  In my
> >> experience, that's good enough :)  No point in some complicated
> >> algorithm when this covers any grammar I'd care about.
> > 
> > A quick question: is any type of direct left recursion handled?
> > I'm probably being an idiot here (it's my normal mode), but your
> > wiki post suggests that this relies on the grammar being built
> > in an "expression" sort-of way, but the above post suggested
> > there might be a bit more flexibility?
> 
> Hi. Yep, in the end, it was straightforward to convert any
> immediate left recursion 

People keep saying that, but I can't seem to figure it out.  I
especially can't see any way to deal with left recursion that
doesn't totally break the meaningfulness of the resulting parse
tree.

Here's the bane of my PEG existence, from the Lojban grammar; it's a
very simple two-argument-only RPN calculator:

  rp-expression <- rp-expression rp-expression operator / operand

I can't see any way to fix that that leaves the operators associated
with their argumenst properly.

I'd love some help, if people have time.

-Robin

_______________________________________________
PEG mailing list
PEG@lists.csail.mit.edu
https://lists.csail.mit.edu/mailman/listinfo/peg

Reply via email to