From lojban+bncCLr6ktCfBBCpqrDnBBoEIGHQWA@googlegroups.com Tue Nov 23 11:25:53 2010 Received: from mail-px0-f189.google.com ([209.85.212.189]) by chain.digitalkingdom.org with esmtp (Exim 4.72) (envelope-from ) id 1PKyUp-0008Nt-D9; Tue, 23 Nov 2010 11:25:52 -0800 Received: by pxi19 with SMTP id 19sf708447pxi.16 for ; Tue, 23 Nov 2010 11:25:37 -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:received:received: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; bh=MnKivVStBxBJsnbrmG+ruwaNKyhY6Vo0HXxYEas6hiw=; b=YVpVPutB0ILIodwF08t9L481pDaaAmE9tC4mpPWhPcrwT6SQwXKMGihuaMFUgx7bvs C0bw5SmWEUeqaOegI+qsodVcwPK8Uj6XySUaUOw1FZR5V0FYl/M03V4l4GVYDfyOf4Zl lNROQfrxI65VbwSYymgLuwf+uhpBxFJAHSLUk= 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; b=psAp9kmB6A204BI+XH2XiYzDN7Nyy3YWQCEvGmzePVWkUsVkBGv+jHcLQc/Rd0sfkP JCNWH4waw+GhujVTBOck14/umLek2qz+Zc9JIz0A2Le9cVedJmcfLDO725WDL3iH9Qvl 1zORlddRwnrQZ9AR3u41ErCOwyyDtX1kmc+MY= Received: by 10.143.26.38 with SMTP id d38mr394083wfj.3.1290540329966; Tue, 23 Nov 2010 11:25:29 -0800 (PST) X-BeenThere: lojban@googlegroups.com Received: by 10.142.2.41 with SMTP id 41ls72218wfb.0.p; Tue, 23 Nov 2010 11:25:28 -0800 (PST) Received: by 10.142.177.9 with SMTP id z9mr4831719wfe.18.1290540328019; Tue, 23 Nov 2010 11:25:28 -0800 (PST) Received: by 10.142.177.9 with SMTP id z9mr4831716wfe.18.1290540327984; Tue, 23 Nov 2010 11:25:27 -0800 (PST) Received: from mail-pz0-f46.google.com (mail-pz0-f46.google.com [209.85.210.46]) by gmr-mx.google.com with ESMTP id f13si9452291wfo.0.2010.11.23.11.25.27; Tue, 23 Nov 2010 11:25:27 -0800 (PST) Received-SPF: neutral (google.com: 209.85.210.46 is neither permitted nor denied by best guess record for domain of alanpost@sunflowerriver.org) client-ip=209.85.210.46; Received: by pzk6 with SMTP id 6so771380pzk.5 for ; Tue, 23 Nov 2010 11:25:27 -0800 (PST) Received: by 10.142.213.21 with SMTP id l21mr7195403wfg.272.1290540327589; Tue, 23 Nov 2010 11:25:27 -0800 (PST) Received: from sunflowerriver.org (c-68-35-167-179.hsd1.nm.comcast.net [68.35.167.179]) by mx.google.com with ESMTPS id y42sm8307311wfd.22.2010.11.23.11.25.25 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 23 Nov 2010 11:25:26 -0800 (PST) Date: Tue, 23 Nov 2010 12:25:23 -0700 From: ".alyn.post." To: lojban@googlegroups.com Subject: Re: [lojban] NORATS, SPACE, and PUBLIC in PEG grammar Message-ID: <20101123192523.GH10838@alice.local> Mail-Followup-To: lojban@googlegroups.com References: <20101123180616.GB10838@alice.local> <20101123181027.GQ9301@digitalkingdom.org> <20101123181658.GR9301@digitalkingdom.org> <20101123183210.GD10838@alice.local> <20101123184601.GS9301@digitalkingdom.org> <20101123185735.GF10838@alice.local> <20101123190215.GW9301@digitalkingdom.org> Mime-Version: 1.0 In-Reply-To: <20101123190215.GW9301@digitalkingdom.org> X-Original-Sender: alyn.post@lodockikumazvati.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.210.46 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 On Tue, Nov 23, 2010 at 11:02:15AM -0800, Robin Lee Powell wrote: > On Tue, Nov 23, 2010 at 11:57:35AM -0700, .alyn.post. wrote: > > I settled on extending the grammar definition by tagging > > expressions, which pollutes the grammar but makes the code using > > the grammar easier to write. It doesn't accomplish your goal of > > not having a bunch of non-grammar garbage in the peg file. :-( > > Well, show me what you end up with when you're done and we'll see > how it looks. > It doesn't look stellar: http://bugs.call-cc.org/browser/release/4/genturfahi/trunk/tests/mex.peg I choose to use Racket Scheme-style keyword tags, which have the form #:FOO. Note also that this grammar uses Scheme-style character expressions, like #\+ and #\*, which are ugly in a way that doesn't affect the Lojban grammar, which would express the same as [+] and [*]. > what Lisp PEG parser generator are you using? :) > > -Robin > Jerk. :-) I'm writing one: http://wiki.call-cc.org/eggref/4/genturfahi Last night I finished the boostrap parser generator, and I'm comparing differences in my hand-written parser generator vs the one it is generating. I of course have issues to fix before my parser generator is self-hosting, but I'm down around 10 differences in the bootstrap generator vs the one written in PEG, and the last several differences have been bugs in the bootstrap rather than bugs in the version the bootstrap is generating. I started by using the only scheme PEG parser I knew about, but I quickly gave up on it and realized I needed something that would work directly with PEG files: http://wiki.call-cc.org/eggref/4/genturfahi#history I managed to find two bugs in Chicken Scheme while I was writing the parser, both related to DSSSL-style #!rest, #!optional, and #!key parameters, so I suspect I'm the only person on the planet who has tried using them: https://bugs.call-cc.org/ticket/421 https://bugs.call-cc.org/ticket/430 As well as learn something about Scheme I didn't know: https://bugs.call-cc.org/ticket/433 The bootstrap compiler is compiling the morphology and morphology header file, but I'm still working on the peg grammar itself. I've written the code with the idea that I could port it to other scheme systems, particularly Racket, though this is only theoretical at this point, as there is zero demand for such a thing. :-) Given that Lojban is used as an example of a complex PEG grammar: http://en.wikipedia.org/wiki/Parsing_expression_grammar#External_links I'm not sure it's a bad idea to have a peg parser generator written specifically to parse Lojban. I do wish there had been something available already, but I'm not aware of Scheme code that parsers PEG files--they all seem to want to write the grammar definition in Scheme itself. -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.