From lojban+bncCLr6ktCfBBCN8ZzqBBoElbiY7Q@googlegroups.com Mon Jan 31 14:33:01 2011 Received: from mail-gw0-f61.google.com ([74.125.83.61]) by chain.digitalkingdom.org with esmtp (Exim 4.72) (envelope-from ) id 1Pk2Ir-0002BA-Fd; Mon, 31 Jan 2011 14:33:01 -0800 Received: by gwb20 with SMTP id 20sf4130245gwb.16 for ; Mon, 31 Jan 2011 14:32:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:x-beenthere:received-spf:date:from:to:subject :message-id:mail-followup-to:references:mime-version:in-reply-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-disposition:content-transfer-encoding; bh=kTqo5tcXSoWlOuOccHVpfobCujVyDJ+VRrxOa/BIhOU=; b=S7shAYsjWgyRG0t+2YfKXox/aO4vQnWOInD85E0Ww8BDyEEKiMqD/Jl7gfBJJ5horw lgBuvat/93CC7vYpT91ykM82jhvcrgZf5JQ/lxeFhedSWwvIOXoLnza82adICTDvAWY3 Pp7hr+/OxvjVxiV5t92nyEXCqMRKa917TUqZ0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-beenthere:received-spf:date:from:to:subject:message-id :mail-followup-to:references:mime-version:in-reply-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-disposition:content-transfer-encoding; b=KPA7oQn0VA6gTuXKp/HFOIkp70KjKgIe9/YewwGo8C/QCnZnWqlrAhavcCWkAzwlid qDUxiPmb2dQUU8F8/b/PTFZq30Gm3//b5hCneLqUgUtnt8vm9oXgBzHISKVUKsDZCRVG g9ikXFNnNneYpBEopUR+MIndgI9T7WIQqoAy4= Received: by 10.147.171.18 with SMTP id y18mr9331yao.28.1296513165919; Mon, 31 Jan 2011 14:32:45 -0800 (PST) X-BeenThere: lojban@googlegroups.com Received: by 10.151.17.13 with SMTP id u13ls2951627ybi.1.p; Mon, 31 Jan 2011 14:32:44 -0800 (PST) Received: by 10.236.108.37 with SMTP id p25mr2799438yhg.10.1296513164874; Mon, 31 Jan 2011 14:32:44 -0800 (PST) Received: by 10.236.108.37 with SMTP id p25mr2799437yhg.10.1296513164853; Mon, 31 Jan 2011 14:32:44 -0800 (PST) Received: from mail-yi0-f54.google.com (mail-yi0-f54.google.com [209.85.218.54]) by gmr-mx.google.com with ESMTPS id a34si228545yhd.8.2011.01.31.14.32.44 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 31 Jan 2011 14:32:44 -0800 (PST) Received-SPF: neutral (google.com: 209.85.218.54 is neither permitted nor denied by best guess record for domain of alanpost@sunflowerriver.org) client-ip=209.85.218.54; Received: by yie19 with SMTP id 19so2345662yie.13 for ; Mon, 31 Jan 2011 14:32:44 -0800 (PST) Received: by 10.236.102.129 with SMTP id d1mr13819670yhg.50.1296513164557; Mon, 31 Jan 2011 14:32:44 -0800 (PST) Received: from sunflowerriver.org (173-10-243-253-Albuquerque.hfc.comcastbusiness.net [173.10.243.253]) by mx.google.com with ESMTPS id i56sm1619343yhd.14.2011.01.31.14.32.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 31 Jan 2011 14:32:43 -0800 (PST) Date: Mon, 31 Jan 2011 15:32:39 -0700 From: ".alyn.post." To: lojban@googlegroups.com Subject: Re: [lojban] confusion over FUhE-post PEG grammar rule Message-ID: <20110131223239.GC49994@alice.local> Mail-Followup-To: lojban@googlegroups.com References: <20110131150504.GA49994@alice.local> Mime-Version: 1.0 In-Reply-To: X-Original-Sender: alyn.post@lodockikumazvati.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.218.54 is neither permitted nor denied by best guess record for domain of alanpost@sunflowerriver.org) smtp.mail=alanpost@sunflowerriver.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 Content-Transfer-Encoding: quoted-printable On Mon, Jan 31, 2011 at 07:14:03PM -0300, Jorge Llamb=EDas wrote: > On Mon, Jan 31, 2011 at 12:05 PM, .alyn.post. > wrote: > > I'm confused over the intent of the FUhE-post production in the PEG > > grammar: > > > > FUhE-clause <- FUhE-pre FUhE-post > > FUhE-pre =A0 =A0<- pre-clause FUhE spaces? > > FUhE-post =A0 <- !BU-clause spaces? !ZEI-clause !BU-clause >=20 > Probably a remnant of an older version where it did something. >=20 > > The ! predicate does not advance the input, so if you walk through > > each rule in the FUhE-post production, you try to: > > > > =A0* not match BU-clause. =A0If we find one, we no-match This immediat= ely > > =A0 and stop checking. =A0The input isn't advanced if we non-match it. >=20 > The idea is that "fu'e bu" will not match FUhE-clause. >=20 > I don't think this ever comes into play though. This applies to the > !BU-clause !ZEI-clause in post-clause as well. If I'm not mistaken > they ccould be removed. >=20 I think you're right, though I'm going to prove it with a test case before removing them. I'm getting there, but don't have anything solid to report yet. Properly testing this basically requires that I put most of the parser together, so I've been focused on general infrastructure building rather than on specific test cases. > > =A0* the spaces? production will always match the empty string, as > > =A0 FUhE-post only appears in FUhE-clause, and FUhE-pre, the rule > > =A0 before it, ends with a spaces? >=20 > This also applies to the spaces? in post-clause. If I'm not mistaken, > it never gets a chance to grab any spaces. >=20 Correct. I have a patch out to camxes which fixes this, but I haven't push it to Robin yet. > > =A0* not match ZEI-clause. =A0If we find ZEI-clause, we immediately > > =A0 stop checking. =A0If we don't find one, the input is not advanced. > > =A0* not match BU-clause. =A0This is where I get confused. =A0We haven'= t > > =A0 advanced the token stream, and we've already checked for a > > =A0 BU-clause earlier. >=20 > Right, it's redundant. But I think even the first one is doing nothing. >=20 > > The final !BU-clause is either: > > > > =A0* redundant > > =A0* should be something like !(ZEI-clause BU-clause) >=20 > What for? >=20 > > Anything I missed? >=20 > Probably not. Remember that the PEG has never really been optimized, > and it has gone through some changes, especially concerning magic > words. >=20 After I fix the BU bug I recently identified, I'm going to test magic word handling. Once I have solid test cases there I'll be in a position to both optimize the grammar and clean up cruft related to changes that occured as Robin developed it into it's present form. -Alan --=20 .i ko djuno fi le do sevzi --=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.