[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lojban] confusion over FUhE-post PEG grammar rule
On Mon, Jan 31, 2011 at 12:05 PM, .alyn.post.
<alyn.post@lodockikumazvati.org> wrote:
> I'm confused over the intent of the FUhE-post production in the PEG
> grammar:
>
> FUhE-clause <- FUhE-pre FUhE-post
> FUhE-pre <- pre-clause FUhE spaces?
> FUhE-post <- !BU-clause spaces? !ZEI-clause !BU-clause
Probably a remnant of an older version where it did something.
> The ! predicate does not advance the input, so if you walk through
> each rule in the FUhE-post production, you try to:
>
> * not match BU-clause. If we find one, we no-match This immediately
> and stop checking. The input isn't advanced if we non-match it.
The idea is that "fu'e bu" will not match FUhE-clause.
I don't think this ever comes into play though. This applies to the
!BU-clause !ZEI-clause in post-clause as well. If I'm not mistaken
they ccould be removed.
> * the spaces? production will always match the empty string, as
> FUhE-post only appears in FUhE-clause, and FUhE-pre, the rule
> before it, ends with a spaces?
This also applies to the spaces? in post-clause. If I'm not mistaken,
it never gets a chance to grab any spaces.
> * not match ZEI-clause. If we find ZEI-clause, we immediately
> stop checking. If we don't find one, the input is not advanced.
> * not match BU-clause. This is where I get confused. We haven't
> advanced the token stream, and we've already checked for a
> BU-clause earlier.
Right, it's redundant. But I think even the first one is doing nothing.
> The final !BU-clause is either:
>
> * redundant
> * should be something like !(ZEI-clause BU-clause)
What for?
> Anything I missed?
Probably not. Remember that the PEG has never really been optimized,
and it has gone through some changes, especially concerning magic
words.
mu'o mi'e xorxes
--
You received this message because you are subscribed to the Google Groups "lojban" group.
To post to this group, send email to lojban@googlegroups.com.
To unsubscribe from this group, send email to lojban+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/lojban?hl=en.