From lojban-out@lojban.org Wed Nov 10 12:55:28 2004 Return-Path: X-Sender: lojban-out@lojban.org X-Apparently-To: lojban@yahoogroups.com Received: (qmail 82583 invoked from network); 10 Nov 2004 20:55:28 -0000 Received: from unknown (66.218.66.216) by m8.grp.scd.yahoo.com with QMQP; 10 Nov 2004 20:55:28 -0000 Received: from unknown (HELO chain.digitalkingdom.org) (64.81.49.134) by mta1.grp.scd.yahoo.com with SMTP; 10 Nov 2004 20:55:28 -0000 Received: from lojban-out by chain.digitalkingdom.org with local (Exim 4.34) id 1CRzUz-0005JI-AT for lojban@yahoogroups.com; Wed, 10 Nov 2004 12:55:25 -0800 Received: from chain.digitalkingdom.org ([64.81.49.134]) by chain.digitalkingdom.org with esmtp (Exim 4.34) id 1CRzU7-0005IJ-UW; Wed, 10 Nov 2004 12:54:32 -0800 Received: with ECARTIS (v1.0.0; list lojban-list); Wed, 10 Nov 2004 12:54:26 -0800 (PST) Received: from rlpowell by chain.digitalkingdom.org with local (Exim 4.34) id 1CRzTn-0005I2-Fn for lojban-list@lojban.org; Wed, 10 Nov 2004 12:54:11 -0800 Date: Wed, 10 Nov 2004 12:54:11 -0800 Message-ID: <20041110205411.GD17470@chain.digitalkingdom.org> Mail-Followup-To: lojban-list@lojban.org References: <20041107081848.GW18082@chain.digitalkingdom.org> <1099989949.419083bdf00a0@imp3-q.free.fr> <20041109190255.GW20718@chain.digitalkingdom.org> <1100077185.4191d881ce20e@imp3-q.free.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1100077185.4191d881ce20e@imp3-q.free.fr> User-Agent: Mutt/1.5.6+20040722i X-archive-position: 8974 X-ecartis-version: Ecartis v1.0.0 Sender: lojban-list-bounce@lojban.org Errors-to: lojban-list-bounce@lojban.org X-original-sender: rlpowell@digitalkingdom.org X-list: lojban-list To: lojban@yahoogroups.com X-eGroups-Remote-IP: 64.81.49.134 X-eGroups-From: Robin Lee Powell From: Robin Lee Powell Reply-To: rlpowell@digitalkingdom.org Subject: [lojban] Re: Computer grammar question: non-left recursive RPN? X-Yahoo-Group-Post: member; u=116389790 X-Yahoo-Profile: lojban_out X-Yahoo-Message-Num: 23378 On Wed, Nov 10, 2004 at 09:59:45AM +0100, Jo l'apache wrote: > there was no operand in the version I submitted you, so it was wrong anyway. > > here is another version : > > rp-expression = rp-operand rp-operand operator > rp-operand = operand rp-operand' > rp-operand' = rp-operand operator rp-operand' | () The second two statements are exactly equivalent to my current version: rp-expression <- operand rp-expression-tail rp-expression-tail <- rp-expression operator rp-expression-tail / () I don't think the first line makes any difference. This works, but it's right recursive, so the parse tree looks wrong. Thanks for trying, though. The parser generator I'm using actually has a way around this, but using it makes the resulting code GPLd. Not sure what I'm gonna do about that. -Robin -- http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ Reason #237 To Learn Lojban: "Homonyms: Their Grate!" Proud Supporter of the Singularity Institute - http://singinst.org/