[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lojban-beginners] Re: Enumerating in Lojban



On Mon, Jul 10, 2006 at 01:27:22PM -0400, Jonathan Gibbons wrote:
> On 7/10/06, Robin Lee Powell <rlpowell@digitalkingdom.org> 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/