WikiDiscuss Help

Forums > WikiDiscuss > Magic Words > Magic Words

Magic Words


rlpowell posts: 14214

On Wed, Nov 10, 2004 at 08:43:03AM -0800, Jorge Llamb?as wrote:
> --- "Mark E. Shoulson" wrote:
> > Since it does affect the whole input and parsing routine, this
> > is more "magical" than working out when the function of LE or
> > BAI is cancelled.
>
> Yes, it's much more powerful once it can fulfill its function, but
> that doesn't seem like a reason to introduce exceptions to allow
> it to fulfill its function in places where no other word is
> allowed to.
>
> There are other issues I have with FAhO, though.
>
> 1) If we really need such a metagrammatical word for
> end-of-parsable-input, how come a corresponding word for
> beginning-of-parsable-input is not needed?

Because we couldn't process it: the preceeding text, not being valid
Lojban (by definiton) can't be parsed, and probably can't even be
broken up syntactically. Furthermore, whatever word we chose, it
could appear in the preceeding (non-Lojban) text in error.

> 2) At least in Robin's parser implementation, FAhO has a true
> magic word grammatical function besides its end-of-parsable-input
> metagrammatical function. If I understand correctly, in Robin's
> parser FAhO swallows also any preceding word that makes the
> text ungrammatical.

  • NO*. This is *not* correct.

 
PEG parsers, by default, output only those things they processed
successfully. A grammatical error before fa'o causes that error and
all that follows, *including* fa'o, to not be processed. Sort of.
It's really more complicated than that.

So the effect you're assigning to fa'o actually happens no matter
what, fa'o or not.

> 3) I think it would be better if FAhO was just an "end of
> grammatical text" (elidable) terminator, i.e.: text = (rest of
> grammar) /FAhO/ This way it would not be a magic word, it could be
> erased with SI/SA/SU, and used as "any-word" by BU and ZEI. So you
> could easily fix a {fa'o si fo'a} mistake.

This removes the primary function of fa'o, which is to allow
arbitrary non-Lojban text afterwards.

Think of it as an uncloseable zoi.

Whether that function is important or not is a seperate discussion.

> Recognizing end-of-parsable-input is a metagrammatical function,
> akin to recognizing beginning-of-parsable-input. Doing it with a
> word that can also be used within the grammar (as in {zo fa'o}) is
> weird.

Now *that* I wholeheartedly agree with. fa'o is wierd. Especially
since we have mu'o.

-Robin

 


Show posts: