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

[lojban] Re: gleki xisri'i



On Thu, Dec 25, 2008 at 10:04:05PM +0000, Minimiscience wrote:
> de'i li 25 pi'e 12 pi'e 2008 la'o fy. Robin Lee Powell .fy. cusku
> zoi skamyxatra.
> > We asked for a general CFG, not something that only works in
> > some specific grammar generator.
> .skamyxatra
> 
> When did you say that?  In your original e-mail
> (<http://www.lojban.org/lists/lojban-beginners/msg06812.html>) you
> said, in addition to the passage quoted earlier, "Produce a
> working CFG for Lojban, in any format that some parser generator
> somewhere can accept...".  I don't see any restriction to a
> general CFG anywhere in that thread.

What part of "working CFG" was unclear?  What you produced isn't
one, as far as I can tell.

What you produced is exactly the same as the current official
parser: a yacc grammar that uses hard-to-port tricks to deal with
elidable terminators.

> > Furthermore, and this is much more important, unless I'm really
> > missing something you're *changing the precedence as the grammar
> > is parsed*.  That is, if a parse doesn't work without a
> > particular terminator you drop the precedence of that
> > terminator-free production to zero *at parse time*.  If that's
> > reducable to a 4-tuple a la
> > http://en.wikipedia.org/wiki/Context_free_grammar I'd be
> > *really* surprised indeed!
> 
> That's not how it works.  If the parser must choose between
> reducing the current construct and shifting the next terminal
> before reducing, it uses the precedence rules to determine which
> action to take, and these precedence rules are set in stone when
> Yacc parses its input.  In the case of the Lojban grammar, if a
> construct can be terminated and the terminator is the next input
> symbol, the terminator is shifted onto the stack, and then the
> entire construct is reduced.  This takes place regardless of
> whether it leads to a valid parse tree.  

OK.  That's not how I read the page; I read it that %prec isn't
processed until that point in the tree is reached.

Regardless, I can't verify any of this myself because I haven't been
able to run it, as I said in another mail.  Some help there would be
nice.

-Robin

-- 
They say:  "The first AIs will be built by the military as weapons."
And I'm thinking:  "Does it even occur to you to try for something
other than the default outcome?" -- http://shorl.com/tydruhedufogre
http://www.digitalkingdom.org/~rlpowell/ *** http://www.lojban.org/


To unsubscribe from this list, send mail to lojban-list-request@lojban.org
with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if
you're really stuck, send mail to secretary@lojban.org for help.