From lojban+bncCJ2UzZHuDRD92LLpBBoE7HUfyw@googlegroups.com Tue Jan 11 11:16:34 2011 Received: from mail-ww0-f61.google.com ([74.125.82.61]) by chain.digitalkingdom.org with esmtp (Exim 4.72) (envelope-from ) id 1Pcjhg-0002TX-4u; Tue, 11 Jan 2011 11:16:33 -0800 Received: by wwb34 with SMTP id 34sf23198502wwb.16 for ; Tue, 11 Jan 2011 11:16:17 -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:mime-version:received:received :in-reply-to:references:date:message-id:subject:from:to :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-transfer-encoding; bh=yxabfT78YtynlbF3b43YoeJq+YRVTdngTzPYmZPe38k=; b=fuyJaoTSxF7ExalyVGtCA5sqNhfmutt/4sXgun3zlxv1GPFs4g2UdrTkjvQBF31vWg 5pUU+fZiBOGso6/xEKvrCn72y2Rzpj6bpHpGJIcm803UqO+RUrWu+Do0JcT9ZfqubwCU 5AWXvl83eOU/Db7i2Hss0kwdcLnyHeGiZq+/c= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:mime-version:in-reply-to:references:date :message-id:subject:from:to: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-transfer-encoding; b=U/VhZ7H9Oy+urcowREXJE7c59JmzUSczozI0xuE5O2hbuRdsltJf+5V/SVpIXwqCbo 6WjNGaX6I1okJcrf4AoJBOFtHH5GykN0JSJ+V5OWKH8N0B9VYJXO86bFlEZH33VKHIy3 WKjGjlexOIo/DyvhCtPe9JXU2aYzA20LsueH8= Received: by 10.216.188.76 with SMTP id z54mr7851wem.9.1294773373738; Tue, 11 Jan 2011 11:16:13 -0800 (PST) X-BeenThere: lojban@googlegroups.com Received: by 10.227.102.89 with SMTP id f25ls3530868wbo.0.p; Tue, 11 Jan 2011 11:16:12 -0800 (PST) Received: by 10.227.135.17 with SMTP id l17mr1106131wbt.19.1294773372365; Tue, 11 Jan 2011 11:16:12 -0800 (PST) Received: by 10.227.135.17 with SMTP id l17mr1106130wbt.19.1294773372306; Tue, 11 Jan 2011 11:16:12 -0800 (PST) Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com [74.125.82.172]) by gmr-mx.google.com with ESMTP id t13si4751846wbc.4.2011.01.11.11.16.11; Tue, 11 Jan 2011 11:16:11 -0800 (PST) Received-SPF: pass (google.com: domain of jjllambias@gmail.com designates 74.125.82.172 as permitted sender) client-ip=74.125.82.172; Received: by mail-wy0-f172.google.com with SMTP id 23so21701776wyf.3 for ; Tue, 11 Jan 2011 11:16:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.227.144.7 with SMTP id x7mr329586wbu.115.1294773370756; Tue, 11 Jan 2011 11:16:10 -0800 (PST) Received: by 10.227.54.72 with HTTP; Tue, 11 Jan 2011 11:16:09 -0800 (PST) In-Reply-To: <20110111142512.GA38433@197.sub-75-211-132.myvzw.com> References: <20110111142512.GA38433@197.sub-75-211-132.myvzw.com> Date: Tue, 11 Jan 2011 16:16:09 -0300 Message-ID: Subject: Re: [lojban] vocative production in PEG grammar From: =?ISO-8859-1?Q?Jorge_Llamb=EDas?= To: lojban@googlegroups.com X-Original-Sender: jjllambias@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jjllambias@gmail.com designates 74.125.82.172 as permitted sender) smtp.mail=jjllambias@gmail.com; dkim=pass (test mode) header.i=@gmail.com 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-Transfer-Encoding: quoted-printable On Tue, Jan 11, 2011 at 11:25 AM, .alyn.post. wrote: > The PEG grammar has the following production: > > vocative <- ( COI-clause NAI-clause? )+ DOI-clause > =A0 =A0 =A0 =A0 =A0/ ( COI-clause NAI-clause? ) ( COI-clause NAI-clause? = )* > =A0 =A0 =A0 =A0 =A0/ DOI-clause > > Which is a bit curious to me. =A0It *seems* like it could be > rewritten as: > > vocative <- ( COI-clause NAI-clause? )* DOI-clause? > > The only difference I can see between these two cases are that the > second form will match the empty string, whereas the first will not. Right. > It looks like that is a problem for one of the ordered choices in the > 'free' production. =A0(I'm not sure if that can be addressed yet.) > > If vocative is written this way so that it does not match the empty > string, why isn't it written this way?: > > vocative <- ( COI-clause NAI-clause? )+ DOI-clause > =A0 =A0 =A0 =A0 =A0/ ( COI-clause NAI-clause? )+ > =A0 =A0 =A0 =A0 =A0/ DOI-clause > > Where the second ordered choice uses the + operator instead of > FOO FOO*? Or even better: vocative <- ( COI-clause NAI-clause? )* DOI-clause / ( COI-clause NAI-clause? )+ It was probably generated by some automatic conversion from the EBNF, and Robin didn't bother to write it more efficiently. mu'o mi'e xorxes --=20 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@googlegrou= ps.com. For more options, visit this group at http://groups.google.com/group/lojban= ?hl=3Den.