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

[lojban] Re: Annotated PEG grammar



On Sat, Nov 15, 2008 at 8:21 PM, Stephen Pollei
<stephen.pollei@gmail.com> wrote:
>
> Yes I think that maybe making sure that the grammar can handle things
> like the magic words in a way most can agree on would be great.

Those are already handled properly by Robin's grammar:
<http://www.digitalkingdom.org/~rlpowell/hobbies/lojban/grammar/lojban.peg.txt>

(Except for SA, which is still a big mess.)

> Also there might be minor things that could be changed that don't
> really change things much.
> {paragraph <- (statement / fragment) (I !jek !joik !joik-jek free*
> (statement / fragment)?)*}
> could be changed to
> {paragraph <- (statement / fragment) (I  !joik-jek free* (statement /
> fragment)?)*}
> or {paragraph <- (statement / fragment) (I !jek !joik  free*
> (statement / fragment)?)*} .
>
> given {joik-jek <- joik free* / jek free*} it's slightly redundant.

Yes. In fact that !joik-jek in front of free* is extremely weird. If
it's needed at all, it has to go after free*, otherwise it looks like
the presence of a free (which itself can never begin with joik-jek)
would license a "statement" that begins with joik-jek (I suppose
somethig that begins with joi gi... gi ...). And that would be a
really weird function for "free".

mu'o mi'e xorxes

>
>>
>>  For example, why is joik-jek up there in the text rule instead of
>>  being a fragment?
>
> I can't really speak to Jorge Llambías's suggestions about fragments.
> It seems sensible to me, but I lack the experience and knowlege to
> really evaluate his suggestion properly.
>
>>
>>  BTW, the comment about free* and UI is not exactly rght. In fact UI is
>>  not an instance of free, and can occur in a few more places than
>>  free*. For example, UI can occur between CMENE and free can't. That's
>>  another thing that should be changed, free should be able to appear
>>  anywhere that it doesn't cause a problem.
>
> "text-part-2" , "sumti-6" , and "free" all have CMENE+ rules and there
> is a indicators rule that might be appropriate or not.
>    indicators <- FUhE? indicator+
>    indicator <- ((UI / CAI) NAI? / DAhO / FUhO) !BU
> If you created a rule like:
> names <- CMENE+ indicators? (CMENE+ indicators?)*
> and then used "names" instead of "CMENE+" inside those three rules
> would that be close to what you suggest?
>
> names <- (CMENE+ indicators / )* CMENE+
> hmm you did say between, not sure if you can do a zero-width match like that.
>
> text-part-2 <- (CMENE+ / indicators?) free*
> sumti-6 <- ... / LA free* relatives? CMENE+ free* / ...
> free <- ... / vocative relatives? CMENE+ free* relatives? DOhU? / ...
>
> text-part-2 <- (names / indicators)? free*
> sumti-6 <- ... / LA free* relatives? names free* / ...
> free <- ... / vocative relatives? names free* relatives? DOhU? / ...
>
> Hmm now that I look at it free also doesn't seem to list UI either.
>
> post-clause <- spaces? si-clause? !ZEI-clause !BU-clause indicators*
> that probably does much of the UI usage soak up.
>
> CMENE-clause <- CMENE-pre CMENE-post
> CMENE-pre <- pre-clause CMENE spaces?
> CMENE-post <- post-clause
> SPACE CMENE-no-SA-handling <- pre-clause CMENE post-clause
>
> And it looks like the CMENE stuff already might soak up indicators. Not sure.
>
>
> 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.
>
>


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.