WikiDiscuss

WikiDiscuss


Magic Words

posts: 14214

On Tue, Nov 09, 2004 at 01:15:32PM -0800, Jorge Llamb?as wrote:
>
> --- Robin Lee Powell wrote:
> > > text = (rest of the grammar) faho-stop
> > >
> > > faho-stop = FAhO / any-word faho-stop
> > >
> > > What I would want is for FAhO to absorb any extra word as
> > > needed to leave a grammatical text behind. Is that how FAhO is
> > > supposed to work?
> >
> > No. fa'o is a complete cessation of input; if what leads up to
> > the fa'o isn't grammatical, then an error results.
>
> Wouldn't it be useful to be able to bail out of a text in
> midsentence without losing any grammatical prior parts?

Heck no, because then you can't say anything else!

> If that's not the case, then FAhO is not a magic word, since it
> doesn't deal with any-word in any way.

Sure it does:

faho-stop = FAhO any-word*

I actually use .* instead in my parser, though.

-Robin