[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lojban] Re: PEG left recursive definitions
- To: lojban-list@lojban.org
- Subject: [lojban] Re: PEG left recursive definitions
- From: "Chris Capel" <pdf23ds@gmail.com>
- Date: Tue, 30 Oct 2007 20:25:07 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=HT5RRYAEpKJF69rWb4sI8DTJ/6pxfanFazWlO1hRQHA=; b=M5DjAFkSh0akZw8WLWpCSQVy/1v5tCwktGaFIFa3Qt2m3fsOjIPoutwkdsex4548cSgGyy7I64ld+Y2QPNB6Ad1ATr/JV7OspKfB+/gAZnKlVCbf1UiHUVR7Jsn8J2IN8c8tboI6TPlW8V2JyCwyfhIE1NoZ7z3F7pR748Au8jM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=hQzRfjk+LvGj6Df/9HkXPUKomGM0TvCwXlSPWMAkCYBIVcloTXrRnwGD7CuiIhZZOjpsXXix1VisoLNlFMvx7SsqiObwlusi/aSgm4iPoAW38xYOfanksd3vl9VVYZ5YdTCoCgvGeSMkDgy24uyhFhPNJkIkL4exodhu45k1XNM=
- In-reply-to: <20071031005514.GL27850@digitalkingdom.org>
- References: <737b61f30710301744x530646c8q748ccb5190ec3eee@mail.gmail.com> <20071031005514.GL27850@digitalkingdom.org>
- Reply-to: lojban-list@lojban.org
- Sender: lojban-list-bounce@lojban.org
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.