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

[lojban] Re: Annotated PEG grammar



On Sun, Nov 16, 2008 at 14:24, Jorge Llambías <jjllambias@gmail.com> wrote:
> On Sun, Nov 16, 2008 at 5:08 PM, Chris Capel <pdf23ds@gmail.com> wrote:
>> On Sun, Nov 16, 2008 at 13:38, Jorge Llambías <jjllambias@gmail.com> wrote:
>>>> bridi-tail-1 <- bridi-tail-1 gihek !(tag? BO) !(tag? KE) free* bridi-tail-2 tail-terms / bridi-tail-2
>>>>
>>>> This production parses undecorated giheks. To ensure that no BO or KE are used, the lookahead symbol is used.
>>>
>>> Neither a free* nor a bridi-tail-2 can start with (tag? BO), so that
>>> restriction is doing nothing.
>>
>> I think it is, because bridi-tail-2 requires a BO in its gihek clause.
>
> But it can never _start_ with "tag? BO", which is all !(tag? BO) cares about.

The BO (by which I mean tag? BO) is going to be after the gihek in any
case, not at the beginning of the production. The beginning of the
stuff inside the latter part of the gihek, you mean?

The !BO keeps "broda gi'e bo brode" from matching the first option of
bridi-tail-1, instead matching the optional part of bridi-tail-2
(instead of two bridi-tail-2's for broda and brode each).

>>> And the !(tag? KE) seems wrong there. Why is "broda gi'e ke ge brode
>>> gi brodi" disallowed, while "broda gi'e xi pa ke ge brode gi brodi"
>>> allowed by this rule?
>>
>> Is it disallowed?
>
> As a "bridi-tail-1", it's disallowed. (It's allowed as a "bridi-tail".)

Which is sort of the defining difference between the two. I think the
real issue here is the handling of the frees in bridi-tail. Both of
your examples parse, but the latter as a bridi-tail-1, and there's no
reason for it to parse differently just because of a free.

>> It seems to me your second example would still parse
>> passing through bridi-tail-1 and matching the second alternative of
>> gek-sentence.
>
> "broda gi'e ke ge brode gi brodi" will match bridi-tail (but not bridi-tail-1)
>
> "broda gi'e xi pa ke ge brode gi brodi", OTOH, will match bridi-tail-1.
>
> That's inconsistent.

Oh, I see I have duplicated your effort. Scientific method! Yay!

>> In which case the only question is whether the !KE is
>> superfluous.
>
> I suspect it's simply wrong, in order to get the right precedences.
> But in an case, if it belongs there at all, it must go after free*,
> not before.

But what would removing the !KE do? Would it fix it?

Chris Capel
-- 
"What is it like to be a bat? What is it like to bat a bee? What is it
like to be a bee being batted? What is it like to be a batted bee?"
-- The Mind's I (Hofstadter, Dennet)


To unsubscribe from this list, send mail to lojban-list-request@lojban.org
with the subject unsubscribe, or go to http://www.lojban.org/lsg2/, or if
you're really stuck, send mail to secretary@lojban.org for help.