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

Re: [lojban] LALR1 question



I don't think the joi-overloading between selbri and sumti is the worst
problem by any means.  The most problematic case I came across when
doing the pre-parser in jbofi'e was the constructions like

I JA optional-simple-tense BO
I JA optional-simple-tense KE
I JA optional-simple-tense something-else

where the decision to reduce or not depends on whether bo, ke or
something else comes at the end of a tense which has potentially
arbitrary length.  So in this case no value of k is high enough for
LR(k) to be up to the job.

On Tue, Aug 28, 2001 at 02:40:50AM -0400, Rob Speer wrote:
> On Mon, Aug 27, 2001 at 05:29:11PM -0600, Jay Kominek wrote:
> > My conclusion: If you want the language to be syntactically unambiguous,
> > LALR(1) is a fairly good choice. The most you'd want to do is switch to an
> > LR(2) parser. If you need more than that, you're doing something wrong.
> 
> Actually, now I'm wondering - would changing the language to LR(2) actually
> help? What if you change {le broda joi le brode} to {le broda ui joi le brode}
> - would that not parse in LR(2), or does UI somehow not count in the
> lookahead? Am I looking at this all wrong?

-- 
R.P.Curnow,Weston-super-Mare,UK  | C++: n., An octopus made by
http://www.rrbcurnow.freeuk.com/ |  nailing extra legs on a cat.