From lojban-out@lojban.org Thu May 13 15:01:37 2004 Return-Path: X-Sender: lojban-out@lojban.org X-Apparently-To: lojban@yahoogroups.com Received: (qmail 54394 invoked from network); 13 May 2004 22:01:36 -0000 Received: from unknown (66.218.66.166) by m3.grp.scd.yahoo.com with QMQP; 13 May 2004 22:01:36 -0000 Received: from unknown (HELO chain.digitalkingdom.org) (64.81.49.134) by mta5.grp.scd.yahoo.com with SMTP; 13 May 2004 22:01:36 -0000 Received: from lojban-out by chain.digitalkingdom.org with local (Exim 4.32) id 1BOOGk-0002DD-Ph for lojban@yahoogroups.com; Thu, 13 May 2004 15:01:34 -0700 Received: from dsl081-049-134.sfo1.dsl.speakeasy.net ([64.81.49.134] helo=chain.digitalkingdom.org) by chain.digitalkingdom.org with esmtp (Exim 4.32) id 1BOOG7-0002C3-5C; Thu, 13 May 2004 15:00:55 -0700 Received: with ECARTIS (v1.0.0; list lojban-list); Thu, 13 May 2004 15:00:52 -0700 (PDT) Received: from rlpowell by chain.digitalkingdom.org with local (Exim 4.32) id 1BOOFs-0002Bk-Ei for lojban-list@lojban.org; Thu, 13 May 2004 15:00:40 -0700 Date: Thu, 13 May 2004 15:00:39 -0700 Message-ID: <20040513220039.GB4461@digitalkingdom.org> Mail-Followup-To: lojban-list@lojban.org References: <20040513183600.GJ4461@digitalkingdom.org> <20040513193917.GC16333@fysh.org> <20040513211121.GS4461@digitalkingdom.org> <20040513212140.GF16333@fysh.org> <20040513212749.GW4461@digitalkingdom.org> <20040513214531.GH16333@fysh.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040513214531.GH16333@fysh.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-archive-position: 7812 X-ecartis-version: Ecartis v1.0.0 Sender: lojban-list-bounce@lojban.org Errors-to: lojban-list-bounce@lojban.org X-original-sender: rlpowell@digitalkingdom.org X-list: lojban-list To: lojban@yahoogroups.com X-eGroups-Remote-IP: 64.81.49.134 X-eGroups-From: Robin Lee Powell From: Robin Lee Powell Reply-To: rlpowell@digitalkingdom.org Subject: [lojban] Re: y: what is it good for? X-Yahoo-Group-Post: member; u=116389790 X-Yahoo-Profile: lojban_out X-Yahoo-Message-Num: 22275 On Thu, May 13, 2004 at 10:45:31PM +0100, Zefram wrote: > I spoke of "the erasure system" from the point of view of a speaker of > the language, to whom they do appear unified. Any way I'd write a > Lojban parser would also share a lot of structure. I assume s/would/they would/. The can't. Please trust me on this; I understand that it looks from a distance like they can, but it's simply not the case. > Not wishing to get your hopes up unreasonably, but I think I can > improve on all your current parsers, in this and other areas. I don't think you have the background to understand how potentially offensive to me that was, so I will not treat it as such. The reason this discussion is occuring is because I am currently devoting a huge amount of my free time to writing a parser that doesn't suck, using a grammatical formalism that is actually capable of handling Lojban. See http://www.digitalkingdom.org/~rlpowell/hobbies/lojban/grammar/ > I'm quite good with machine grammars and parsers. I've witnessed the > problems you've had from trying to bend yacc to the task, and I'm not > surprised you've had difficulty, it's simply not up to the task. > Attempts so far also don't seem to have made the preprocessing stages > sufficiently distinct from the primary parsing. It's difficult to get > that sort of thing right in a complicated parser, especially the first > time round. I don't think you understand: Lojban is not context free, even with pre-processing. At least, everyone who has taken a serious look at it believes that it's not; we have no proof though. First of all, there's zoi, which is not context free in exactly the same way that C variable declarations are not context free. That's not a big deal. Elidable terminators, however, are another matter entirely. I've tried to make the elidable terminators work in pure BNF, really I have. It *may* be possible, but I wouldn't bet on it, and if it *is* possible, it will require increasing the size of the grammar by *at* *least* a factor of 10. I suspect it would be closer to a factor of 50. That's not a joke or an exaggeration: to make elidable terminators work in BNF you need a seperate case for every possible interaction of every elidable terminator, and every production they reference. Even then, I'm not sure it's possible at all. I'd bet against it, even. If you want to try it, grab a copy of one of the versions of the BNF on the page I linked above and I'll send you a couple of the NUhI examples I was working on. Quite frankly, though, we could use your abilities better elsewhere. It turns out, however, that elidable terminators are trivial in a grammatical formalism with left-to-right precedence and greedy matching of repitition. This is how I ended up using Parsing Expression Grammars (http://www.pdos.lcs.mit.edu/~baford/packrat/) for my grammar re-write. Bear in mind that when the YACC grammar was written, I don't even think ANSI C had been completed. This was so long ago that the LLG got a free version of a commercial YACC because they kept finding bugs in the YACC implementation itself, because much of what they were doing had never been done before. As a final comment, please be aware that the official grammar (grammar.300) is the official grammar and that everything in these discussions of what my grammar should be doing is *completely* outside Real Lojban (tm), at least for the time being. -Robin -- http://www.digitalkingdom.org/~rlpowell/ *** I'm a *male* Robin. "Many philosophical problems are caused by such things as the simple inability to shut up." -- David Stove, liberally paraphrased. http://www.lojban.org/ *** loi pimlu na srana .i ti rokci morsi