[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: TECH: PROPOSED GRAMMAR CHANGE X2: non-logical bridi-tail
>John Cowan, in response to a change proposed by Jorge:
>>This change also looks YACC-safe. However (and this applies to X1 as well),
>>changes to the preparser are never very certain until they've been coded
>>up and tested, because the grammar depends on magic selma'o that don't
>>really exist, and it's only a guess whether the preparser can insert them
>Has there been much thought put into finding/writing a better parser than
>YACC so we don't need these messy tricks? I realize it would be a pain in
>the butt to switch over at this late date, though.
Jeff Prothero was into recursive descent parsing, but it proved very slow.
Doug Landauer was intersted at one point in finding for us or wven writing
an LR(n) parser generator for n somewhere between 2 and 4. (Doug, BTW
was the original person who worked on generating a YACC grammar for Loglan
starting way back in 1975 or 1976. Jeff was one of the two who finsished the
work with JCB, in 1980-82, and invented the elidable terminator concept.
But even LR(4) would not eliminate a couple of the lexer/preparser constructs,
since some (like numbers) are not LR(k) for any k, though it would have
allowed the grammar to be significantly simpler.
It is now probably too late because it would take too much work to verify
that any given LR(non-1) grammar generated the same Lojban grammar, or even
anything close. (And how do you like THAT example of tricky Mex syntax