From lojban+bncCLr6ktCfBBCdjqDqBBoEwIqw5g@googlegroups.com Tue Feb 01 05:14:22 2011 Received: from mail-px0-f189.google.com ([209.85.212.189]) by chain.digitalkingdom.org with esmtp (Exim 4.72) (envelope-from ) id 1PkG3m-0007kY-7I; Tue, 01 Feb 2011 05:14:22 -0800 Received: by pxi19 with SMTP id 19sf2135416pxi.16 for ; Tue, 01 Feb 2011 05:14:12 -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:mime-version: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=DXqiLfvGVCX6Q0CgaLGwrnjv5df/g7SijSCI4yGI+4g=; b=J2Ln1IvOrlL3xQpqAmsl4nfkKihhLTDiTEMrFXM0QDJLjKjEL4RhGAc3f6mdHJG8PJ /K5EhUGOJIOF1DauTbiVptk6ULlIYf1TUj+BqA7Llir/qKe4+OM5/t7ArGU9WXILZItY OkGRq9+/04r4c4CkoGsYcxBAqTeY31t7PPTRg= 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:mime-version: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=mVwEDpENQHTmG9lrUXKYhL7PtSuL68TUb7sfQgiH5M0OxbGfXhOlfbuByDXYpbuzIN /ditsSSCXPl017kgigeL3weWSaCXfMGn528KBHnpJCTXFOgC0E2Fg896xy73+eKDvQ0s UhU8mRgsY6E77nti/yeLpF2zafcemYwqsqQt0= Received: by 10.142.173.9 with SMTP id v9mr474152wfe.16.1296566045891; Tue, 01 Feb 2011 05:14:05 -0800 (PST) X-BeenThere: lojban@googlegroups.com Received: by 10.142.121.31 with SMTP id t31ls9271458wfc.3.p; Tue, 01 Feb 2011 05:14:05 -0800 (PST) Received: by 10.142.143.19 with SMTP id q19mr1608828wfd.53.1296566045060; Tue, 01 Feb 2011 05:14:05 -0800 (PST) Received: by 10.142.143.19 with SMTP id q19mr1608827wfd.53.1296566045032; Tue, 01 Feb 2011 05:14:05 -0800 (PST) Received: from mail-px0-f177.google.com (mail-px0-f177.google.com [209.85.212.177]) by gmr-mx.google.com with ESMTPS id w1si12911356wfo.1.2011.02.01.05.14.04 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 01 Feb 2011 05:14:04 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.177 is neither permitted nor denied by best guess record for domain of alanpost@sunflowerriver.org) client-ip=209.85.212.177; Received: by pxi7 with SMTP id 7so1152753pxi.8 for ; Tue, 01 Feb 2011 05:14:04 -0800 (PST) Received: by 10.142.201.9 with SMTP id y9mr64242wff.238.1296566044022; Tue, 01 Feb 2011 05:14:04 -0800 (PST) Received: from sunflowerriver.org (c-68-35-165-60.hsd1.nm.comcast.net [68.35.165.60]) by mx.google.com with ESMTPS id v19sm29798031wfh.12.2011.02.01.05.14.01 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 01 Feb 2011 05:14:02 -0800 (PST) Date: Tue, 1 Feb 2011 06:13:59 -0700 From: ".alyn.post." To: Lojban List Subject: [lojban] jbogenturfa'i grammar testing Message-ID: <20110201131358.GA52215@alice.local> Mail-Followup-To: Lojban List Mime-Version: 1.0 X-Original-Sender: alyn.post@lodockikumazvati.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.212.177 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 I've just checked in my first batch of tests for jbogenturfa'i. I have tests for the selma'o ZOI and CLL 19.10 (which covers ZOI): http://bugs.call-cc.org/browser/release/4/jbogenturfahi/trunk/tests/selmaho/zoi.scm http://bugs.call-cc.org/browser/release/4/jbogenturfahi/trunk/tests/cll/19/10.scm Both of these files compare Lojban statements to the parse tree generated by jbogenturfa'i. I don't return the literal parse tree generated by the grammar but rather an idealized one. For example, here is CLL example 19.10.1: text: zo si cu lojbo valsi jbogenturfa'i. Note that the structure of the text is evident, and that the sentence has a defined selbri and x1 place: (text (paragraphs (paragraph (sentence (term (sumti (ZO-clause (cmavo (ZO "zo")) (cmavo (SI "si"))))) (CU-clause (cmavo (CU "cu"))) (selbri (BRIVLA-clause (gismu "lojbo")) (BRIVLA-clause (gismu "valsi"))))))) camxes. This is the default, camxes has flags that affect the way the parse tree is written: text sentence |- ZOPre | |- CMAVO | | ZO: zo | |- CMAVO | SI: si |- CMAVO | CU: cu |- selbri3 |- BRIVLA | gismu: lojbo |- BRIVLA gismu: valsi jbofi'e -x -b: [ ( zo si ) cu << | lojbo valsi | >> ] [ ( "erase word" ) is/does << | Lojbanic [type-of] being word(s) | >> ] [ ( valsi1 (word(s)) ) << \ / >> ] 1 2 2 3 4 4 3 1 I have not developed enough test cases yet to consider the parse tree I'm generating final, but the basic idea is there: generate a parse tree where the logical structure can be programatically manipulated and the productions generating the grammar can change without affecting the logical parse tree. My next step is to test the remaining selma'o and CLL sections. While I do this, I plan on developing a comprehensive test suite for the grammar and using it to optimize and simplify the PEG grammar, with the goal of getting it sufficiently well tested to become the official grammar. -Alan -- .i ko djuno fi le do sevzi -- 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.