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

[lojban] Re: My parser and ZOI



On Fri, Apr 30, 2004 at 04:39:19PM -0700, Robin Lee Powell wrote:
> I've decided that having a pre-processor just to handle ZOI wasn't
> compromising my principles too badly.  The entire pre-processor

No longer exists.  I've ended up doing it as semantic predicates and
parser actions (AKA "little bits of embedded Java").

There are very *few* such bits.  This solution means that the PEG itself
is no longer a general PEG, but is tied to Rats!.  However, as the bits
of Java consist entirely of "save this to a variable" and "compare this
to the variable we saved earlier", it is reasonable to expect that any
functioning PEG parser generator[1] would be able to handle the same
stuff.

It works.

It even handles "le zoi ibu cgi-bin ibu zei samselpla", which I want to
mention is probably the nastiest piece of Lojban *ever*, once you know
how it breaks down ("The "bu zei samselpla" thing associated with "bu
cgi-bin"."; [shudder]).

This, by the way, is the last known feature needed in my parser.  I'll
see what I can do about finishing the 10, 000 lines of testing output I
have to go through.

-Robin

[1]:  Pappy, the one made by the guy who invented PEGs, is
non-functional as far as I can tell.  Go figure.

-- 
http://www.digitalkingdom.org/~rlpowell/  ***  I'm a *male* Robin.
"Many philosophical problems are caused by such things as the simple
inability to shut up." -- David Stove, liberally paraphrased.
http://www.lojban.org/  ***  loi pimlu na srana .i ti rokci morsi