[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lojban] Re: My parser, SI, SA, and ZOI
On Mon, May 10, 2004 at 07:50:27AM -0400, Bob LeChevalier wrote:
> Lojban grammar was DESIGNED to be a slave to YACC restrictions, that
> being a working definition of LALR1 for purposes of language design.
> That it isn't a correct definition is irrelevant.
We know, Bob. The discussion is about what follows from the definitions
of the words, not what follows from the YACC, which we all pretty much
understand. Or at least we thought we did; I turn out to have been
wrong about ZO handling, as previously stated in this thread.
> In answer to the question in this thread, I believe that the text
> comment in the body of the grammar after the rule defining LohU 436
> addresses the intent for interactions between si and zo and zoi.
Thanks for finding that, Bob. The next comment is general bitchiness
and not specifically directed at you.
<bitchy>
<sarcasm>
Oh, my gosh, why didn't *I* think to look there?
</sarcasm>
Apparently, pre-parser instructions are scattered about the landside in
that file, instead of being confined to the section labelled as such.
Oh well.
</bitchy>
Here's the text in question:
It may be seen that any of the ZO/ZOI/LOhU trio of quotation markers
may contain the powerful metalinguistic erasers. Since these
quotations are not parsed internally, these operators are ignored
within the quote. To erase a ZO, then, two SI's are needed after
giving a quoted word of any type. ZOI takes four SI's, with the
ENTIRE BODY OF THE QUOTE treated as a single 'word' since it is one
selma'o. Thus one for the quote body, two for the single word
delimiters, and one for the ZOI. In LOhU, the entire body is treated
as a single word, so three SI's can erase it.
At first I thought this was merely descriptive of the YACC grammar's way
of handling things, and that is partly true, but not entirely, and it
does answer at least some of our questions.
In particular, it is *absolutely* clear that that SI is supposed to
erase exactly one token, period. So having SI erase both terms of a ZO
quote, for example, is not OK; that behaviour in my parser was due to my
misreading the preparser instructions for ZO.
It's also very clear that quote delimiters of various types are
considered one word for this purpose.
This is all perfectly fine, because it fits with the definition of SI,
which is:
erase the last Lojban word, treating non-Lojban text as a single
word
I am ashamed to say that I hadn't noticed the second half of the
definition. I'd say that pretty much clears things up: deleting a ZOI
clause completely with SI takes 4 SI.
Unfortunately, this doesn't help with things like "zo broda zei broda",
but I'm inclined to say that that's illegal because ZO acts first,
leaving "<zo-quote> zei broda", and a quote is not a single word.
Opinions on that issue welcome, but it seems pretty clear that ZEI only
acts on single words, and quotes are not single words.
-Robin
--
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