From rlpowell@digitalkingdom.org Wed Mar 17 21:26:14 2004 Received: with ECARTIS (v1.0.0; list lojban-list); Wed, 17 Mar 2004 21:26:14 -0800 (PST) Received: from rlpowell by chain.digitalkingdom.org with local (Exim 4.30) id 1B3q2i-0007Mc-OM for lojban-list@lojban.org; Wed, 17 Mar 2004 21:26:08 -0800 Date: Wed, 17 Mar 2004 21:26:08 -0800 To: lojban-list@lojban.org Subject: [lojban] Re: Official parser problem? Message-ID: <20040318052608.GS11847@digitalkingdom.org> Mail-Followup-To: lojban-list@lojban.org References: <20040317222428.GZ11847@digitalkingdom.org> <20040318011211.GH11847@digitalkingdom.org> <20040318012328.GI11847@digitalkingdom.org> <20040318013409.GB12076@ccil.org> <20040318013958.GK11847@digitalkingdom.org> <20040318020848.GO11847@digitalkingdom.org> <20040318031344.GF12076@ccil.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040318031344.GF12076@ccil.org> User-Agent: Mutt/1.5.5.1+cvs20040105i From: Robin Lee Powell X-archive-position: 7247 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 Precedence: bulk Reply-to: lojban-list@lojban.org X-list: lojban-list On Wed, Mar 17, 2004 at 10:13:45PM -0500, John Cowan wrote: > Robin Lee Powell scripsit: > > > John is saying one of two things: > > > > 1. You are wrong in your reading of the grammar. That sentence > > definately fails because [explanation]. > > That's the idea. A parser that gets this wrong is wrong, as the > language is currently specified. Granted. > > 2. You are wrong in your reading of the grammar. That sentence > > definately fails because [explanation]. This is a good thing. > > I hadn't gotten that far. I agree that it's damned unintuitive -- > people internalize the grammar of "si" based on words, not tokens. I > don't know if you were there when I kept trying to quote something > with zo, and kept saying zoi -- this is a disaster in the current > language. > > It may be that John was just describing the current reality, and not > > assigning a value judgement at all, in which case I hope he will > > accept my apology for freaking out. > > No problem. > > The current situation is at least consistent even if stupid. I'd be > open to other ideas that would be less so. Oh *believe* me, I'm working on it. The grammar that I'm currently working on is *not* a CFG. It's called a PEG (for Parsing [1] Exprission Grammar). It is fully formalized (i.e. formalized enough to make mathematical proofs related to it). It is unambiguous (i.e. the way the system is defined, there can only ever be one parse of any string). It has been proven to be at least as powerful as LR(k) or LL(k), for any k up to infinity. It can encode at least some context-sensitive languages. It can without question do Lojban (I know this because I've been doing test runs all day). It has infinite look-ahead and look-behind. In linear time. Memory usage is a bit bad, but whatever. My goal is to produce a completely formalized grammar for Lojban (*including* the morphology) that has no pre-processor at all[2] and encodes something close enough to the current grammar as to invalidate no existing usage. Because no pre-processor is involved, certain things will inherently[3] end up different, like the interaction of si and lo'u...le'u, but I'm certain I can produce something that will be *better*. Then I'll see about taking it to the BPFK, once I've had a few of the smarter people here look over it. I'm being very careful to document everything I do. -Robin [1]: bo [2]: Actually, without an extension to PEGs, 'zoi' cannot be handled without a pre-processor, and without a re-definition that is at least marginally sane, 'sa' doesn't even have a working definition to try to handle. [3]: OK, well, I *could* replicate current behaviour, but as current behaviour is based on the technical limitations of YACC and does not, for example, resemble what is described in the book, why would I do that? -- Me: http://www.digitalkingdom.org/~rlpowell/ *** I'm a *male* Robin. "Constant neocortex override is the only thing that stops us all from running out and eating all the cookies." -- Eliezer Yudkowsky http://www.lojban.org/ *** .i cimo'o prali .ui