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

[lojban] Re: Annotated PEG grammar



On 11/15/08, Chris Capel <pdf23ds@gmail.com> wrote:
> On Sat, Nov 15, 2008 at 21:08, Stephen Pollei <stephen.pollei@gmail.com> wrote:
>  > On 11/15/08, Chris Capel <pdf23ds@gmail.com> wrote:

> No doubt they're important, but the goal of my document is to provide
>  an overview of how lojban works from the perspective of its grammar. I
>  think the -clause details and magic words would distract too much from
>  that purpose. I don't plan on filling out mesko either. (But someone
>  can contribute descriptions if they like.)

That's fair enough

>  > I do think that the whole foo-clause stuff could use some real clean up.
>  > A lot of it is schematic and those should likely be collected into one
>  > place, and the things which get special handling should all be grouped

> > together; right now it's all mixed together by just using an alphabetic
>  > order.


>  I don't think it can be done in pure PEG, alas. Perhaps a source file
>  that generates a peg could be created. :)

Well I mostly meant that a lot of it is like:
BAI-clause <- BAI-pre BAI-post
BAI-pre <- pre-clause BAI spaces?
BAI-post <- post-clause

${cmavo}-clause <- ${cmavo}-pre post-clause
${cmavo}-pre <- BAhE-clause? ${cmavo} spaces?

A little shorter as nobody uses ${cmavo}-post afaik.
All those can be grouped in alphabetical order one after another.

Then there are the special ones which correspond with the magic words,
all those clause ones could be grouped togheter in alphabetical(or
other) order: SI SA SU ZO ZOI LOhU LEhU ZEI BU LAhO and FAhO . I think
the Y-clause is called spaces;-) NIhO, LU, TUhE, and TO might also be
different because of how su interacts with them.
BRIVLA and CMENE might also get specialy written clause stuff.

>  The source file could also
>  output a Rats! version that would be more compact and efficient than
>  the current version, which is quite huge dll-wise.

Well I don't have any ideas on how to optimize things in that way, the
peg is fairly thinish.
I have an idea for the sa thing, but that would most likely make
things bigger not smaller.


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.