From lojban+bncCK30vq5WEN2asOcEGgQFevrZ@googlegroups.com Tue Nov 23 10:52:32 2010 Received: from mail-pz0-f61.google.com ([209.85.210.61]) by chain.digitalkingdom.org with esmtp (Exim 4.72) (envelope-from ) id 1PKxya-0004Mq-Tc; Tue, 23 Nov 2010 10:52:32 -0800 Received: by pzk7 with SMTP id 7sf91858pzk.16 for ; Tue, 23 Nov 2010 10:52:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:x-beenthere:received:received:received :received:received-spf:received:date:from:to:subject:message-id :references:mime-version:in-reply-to:user-agent:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type:content-disposition; bh=LwSpg6sJe5yv18m7Ai71EUq8L7u07Zpt9bQ85vaLSTo=; b=wugm2Ya+/gXnA7a/DfbNqMwe7sJVpM17/s9m2Ak9JmailX1U0Ddc+yz56iqsFdxBDt 3l6ztV4bM/HLjbH03MhsgQU8A/q+h1zaANlarXeC4DykjFMltMsKKX6D1VG4YESCqLOq NcXJR60RYAYkch4V2bCkAqMBucCv6qmZh7MFE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:date:from:to:subject:message-id:references :mime-version:in-reply-to:user-agent:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:sender:list-subscribe :list-unsubscribe:content-type:content-disposition; b=FVXEzlXqM3Y5fFh4L+pLH9kGzsruV8nPZjM6ayaYY84oddFRqOHI2rmRo26jKbvyuk ecbhDsht7dTrPbPfJkSs9C15wBwR5964dMSBW1Vx3jcKfqRDdHWvMvTCUR4sjBuB/f1q ORIAbv8H1Fu14a+Fb5DZpjIv829YmNs3s/2tU= Received: by 10.142.62.31 with SMTP id k31mr394139wfa.44.1290538333964; Tue, 23 Nov 2010 10:52:13 -0800 (PST) X-BeenThere: lojban@googlegroups.com Received: by 10.142.78.15 with SMTP id a15ls3161436wfb.2.p; Tue, 23 Nov 2010 10:52:12 -0800 (PST) Received: by 10.142.128.13 with SMTP id a13mr4840164wfd.3.1290538332595; Tue, 23 Nov 2010 10:52:12 -0800 (PST) Received: by 10.142.128.13 with SMTP id a13mr4840163wfd.3.1290538332568; Tue, 23 Nov 2010 10:52:12 -0800 (PST) Received: from chain.digitalkingdom.org (digitalkingdom.org [173.13.139.234]) by gmr-mx.google.com with ESMTP id n6si9418218wfl.3.2010.11.23.10.52.12; Tue, 23 Nov 2010 10:52:12 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of rlpowell@digitalkingdom.org designates 173.13.139.234 as permitted sender) client-ip=173.13.139.234; Received: from rlpowell by chain.digitalkingdom.org with local (Exim 4.72) (envelope-from ) id 1PKxyN-0004MV-UW for lojban@googlegroups.com; Tue, 23 Nov 2010 10:52:12 -0800 Date: Tue, 23 Nov 2010 10:52:11 -0800 From: Robin Lee Powell To: lojban@googlegroups.com Subject: Re: [lojban] rp-expression-tail ordered choice with empty grouping Message-ID: <20101123185211.GU9301@digitalkingdom.org> References: <20101123184352.GE10838@alice.local> MIME-Version: 1.0 In-Reply-To: <20101123184352.GE10838@alice.local> User-Agent: Mutt/1.5.20 (2009-06-14) X-Original-Sender: rlpowell@digitalkingdom.org X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of rlpowell@digitalkingdom.org designates 173.13.139.234 as permitted sender) smtp.mail=rlpowell@digitalkingdom.org Reply-To: lojban@googlegroups.com Precedence: list Mailing-list: list lojban@googlegroups.com; contact lojban+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: Sender: lojban@googlegroups.com List-Subscribe: , List-Unsubscribe: , Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: inline On Tue, Nov 23, 2010 at 11:43:52AM -0700, .alyn.post. wrote: > What does the following production in the lojban grammar mean?: > > rp-expression-tail <- rp-expression operator rp-expression-tail / > () > > Do I understand that to mean 'the sequence of rp-expression, > operator, and rp-expression-tail OR nothing?' Could the above > also be expressed: > > rp-expression-tail <- (rp-expression operator rp-expression-tail)? > > And if so, why the odd way of specifying it? I'm weak on pitfalls > of recursive behavior in grammars, am I looking at a workaround > related to that? Yes, and it mostly doesn't work. Lojban's RPN (which, if I have my druthers, the next version of the language will not have, by the way) is left-recursive, which is problematic. See the peg mailing list for various solutions, but IMO since a number of PEG parser generators handle this on their own, I think we should just have it be left-recursive and say that people have to use such a generator. If you can figure out how to fix it in in the rules so the right behaviour pops out, though, *please* do so. There are links to papers on the peg mailing list; it came up just last week; "*[1]* *Packrat Parsers Can Support Left Recursion*, Alessandro Warth, James R. Douglass, and Todd Millstein (2008)" is the citation I'm seeing at a brief glance. -Robin -- http://singinst.org/ : Our last, best hope for a fantastic future. Lojban (http://www.lojban.org/): The language in which "this parrot is dead" is "ti poi spitaki cu morsi", but "this sentence is false" is "na nei". My personal page: http://www.digitalkingdom.org/rlp/ -- You received this message because you are subscribed to the Google Groups "lojban" group. To post to this group, send email to lojban@googlegroups.com. To unsubscribe from this group, send email to lojban+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/lojban?hl=en.