From nobody@digitalkingdom.org Mon Jul 10 10:35:42 2006 Received: with ECARTIS (v1.0.0; list lojban-beginners); Mon, 10 Jul 2006 10:35:42 -0700 (PDT) Received: from nobody by chain.digitalkingdom.org with local (Exim 4.62) (envelope-from ) id 1Fzzfa-0003tu-4k for lojban-beginners-real@lojban.org; Mon, 10 Jul 2006 10:35:42 -0700 Received: from rlpowell by chain.digitalkingdom.org with local (Exim 4.62) (envelope-from ) id 1FzzfY-0003tn-Um for lojban-beginners@lojban.org; Mon, 10 Jul 2006 10:35:41 -0700 Date: Mon, 10 Jul 2006 10:35:40 -0700 To: lojban-beginners@lojban.org Subject: [lojban-beginners] Re: Enumerating in Lojban Message-ID: <20060710173540.GV3440@chain.digitalkingdom.org> References: <1684503175.20060710193640@mail.ru> <925d17560607100826x2a37ffcfi69c9964cabf0b53@mail.gmail.com> <537d06d00607100919v70febc62u93929e72b0041c48@mail.gmail.com> <20060710164123.GS3440@chain.digitalkingdom.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.11+cvs20060403 From: Robin Lee Powell X-archive-position: 3403 X-ecartis-version: Ecartis v1.0.0 Sender: lojban-beginners-bounce@lojban.org Errors-to: lojban-beginners-bounce@lojban.org X-original-sender: rlpowell@digitalkingdom.org Precedence: bulk Reply-to: lojban-beginners@lojban.org X-list: lojban-beginners On Mon, Jul 10, 2006 at 01:27:22PM -0400, Jonathan Gibbons wrote: > On 7/10/06, Robin Lee Powell wrote: > > >L*(1) parsers (all of them, I believe) have Problems with joi. > > >As solving this problem only requires two tokens of lookahead, > >it's pretty sad. This is one of the reasons I'm happy with > >camxes > > ...Why not just write it with precedence, and use a GLR parser, > rather than a LALR(1) parser? Because I've never heard of GLR before, and PEG (which is also precedence based) is working out just fine. Did you go to the page I linked to? http://teddyb.org/~rlpowell//hobbies/lojban/grammar/ > I've been poking at writing a transformation program from the EBNF > grammar to a bison grammar for the same thing... in bison, as it > happes. Doesn't "elided when no grammatical ambiguity exists" just > mean "The default is something else when the token is elided and > it could be something else", which is to say, "the rule with > terminator has high precedence, but without has low"? am I missing > something? I have no idea if you're missing something or not, as I haven't tried this approach, but I believe very strongly that there is no CFG that encodes Lojban's elidable terminators. CFG + precedence != CFG; see http://en.wikipedia.org/wiki/Context_free_grammar and http://en.wikipedia.org/wiki/Chomsky_normal_form In fact, I suspect that CFG + precedence ~= PEG, but slower. http://en.wikipedia.org/wiki/Parsing_expression_grammar -Robin -- http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/ Reason #237 To Learn Lojban: "Homonyms: Their Grate!" Proud Supporter of the Singularity Institute - http://singinst.org/