From lojban-out@lojban.org Tue Oct 30 17:58:15 2007 Return-Path: X-Sender: lojban-out@lojban.org X-Apparently-To: lojban@yahoogroups.com X-Received: (qmail 90011 invoked from network); 31 Oct 2007 00:58:15 -0000 X-Received: from unknown (66.218.67.95) by m54.grp.scd.yahoo.com with QMQP; 31 Oct 2007 00:58:15 -0000 X-Received: from unknown (HELO mail5.sea5.speakeasy.net) (69.17.117.7) by mta16.grp.scd.yahoo.com with SMTP; 31 Oct 2007 00:58:15 -0000 X-Received: (qmail 10088 invoked from network); 31 Oct 2007 00:58:11 -0000 X-Received: from chain.digitalkingdom.org ([64.81.66.169]) (envelope-sender ) by mail5.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 31 Oct 2007 00:58:11 -0000 X-Received: from lojban-out by chain.digitalkingdom.org with local (Exim 4.67) (envelope-from ) id 1In1uL-00031D-CO for lojban@yahoogroups.com; Tue, 30 Oct 2007 17:58:10 -0700 X-Received: from chain.digitalkingdom.org ([64.81.66.169]) by chain.digitalkingdom.org with esmtp (Exim 4.67) (envelope-from ) id 1In1tt-0002uj-UB; Tue, 30 Oct 2007 17:57:44 -0700 X-Received: with ECARTIS (v1.0.0; list lojban-list); Tue, 30 Oct 2007 17:55:17 -0700 (PDT) X-Received: from nobody by chain.digitalkingdom.org with local (Exim 4.67) (envelope-from ) id 1In1rY-0002ud-E4 for lojban-list-real@lojban.org; Tue, 30 Oct 2007 17:55:16 -0700 X-Received: from rlpowell by chain.digitalkingdom.org with local (Exim 4.67) (envelope-from ) id 1In1rW-0002uM-MX for lojban-list@lojban.org; Tue, 30 Oct 2007 17:55:15 -0700 Date: Tue, 30 Oct 2007 17:55:14 -0700 Message-ID: <20071031005514.GL27850@digitalkingdom.org> Mail-Followup-To: lojban-list@lojban.org References: <737b61f30710301744x530646c8q748ccb5190ec3eee@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <737b61f30710301744x530646c8q748ccb5190ec3eee@mail.gmail.com> User-Agent: Mutt/1.5.16 (2007-06-11) X-archive-position: 13888 X-ecartis-version: Ecartis v1.0.0 Errors-to: lojban-list-bounce@lojban.org X-original-sender: rlpowell@digitalkingdom.org X-list: lojban-list X-Spam-Score: 0.0 X-Spam-Score-Int: 0 X-Spam-Bar: / To: lojban@yahoogroups.com X-Originating-IP: 69.17.117.7 X-eGroups-Msg-Info: 1:12:0:0:0 X-eGroups-From: Robin Lee Powell From: Robin Lee Powell Reply-To: rlpowell@digitalkingdom.org Subject: [lojban] Re: PEG left recursive definitions X-Yahoo-Group-Post: member; u=116389790; y=lYZ7JrC7dcLceZIWzgirq8wENCn6D05O7ZpxQPN9gJ_-l2zjPA X-Yahoo-Profile: lojban_out X-Yahoo-Message-Num: 28367 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. > If not, would it be helpful if it could? For instance. Example > input: > > x ? x : x > > To parse this, we could write > > expr <- tri-cond / x > tri-cond <- expr '?' expr ':' expr > x <- 'x' > > This would be translated to > > expr-1 <- x > tri-cond <- expr-1 '?' expr ':' expr / expr-1 > expr <- tri-cond / expr-1 > x <- 'x' 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. -Robin -- Lojban Reason #17: http://en.wikipedia.org/wiki/Buffalo_buffalo Proud Supporter of the Singularity Institute - http://singinst.org/ http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ 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.