[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lojban] Re: PEG left recursive definitions



On 10/30/07, Robin Lee Powell <rlpowell@digitalkingdom.org> wrote:
> On Tue, Oct 30, 2007 at 07:44:38PM -0500, Chris Capel wrote:
> > Does the PEG currently use left recursive definitions?
>
> The *only* place in Lojban that is unavoidably left-recursive is the
> RPN mekso stuff.

I was thinking more about places where using left recursion would make
it more elegant and easier to read. For instance, the C# grammar I'm
testing my parser with is massively more elegant with left recursion.
(There are 14 or so levels of precedence for the couple dozen C#
operators, and each one would need its own 'expression-N' production
without left recursion.)

> If you can show me how to fix the RPN productions in my PEG, I'd
> really appreciate it; I never quite got it right.  It parses IFF it
> should parse, but the resulting tree is wrong.

I'll take a look at it, then.

Chris Capel
-- 
"What is it like to be a bat? What is it like to bat a bee? What is it
like to be a bee being batted? What is it like to be a batted bee?"
-- The Mind's I (Hofstadter, Dennet)


To unsubscribe from this list, send mail to lojban-list-request@lojban.org
with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if
you're really stuck, send mail to secretary@lojban.org for help.