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

Re: [lojban] NORATS, SPACE, and PUBLIC in PEG grammar



On Tue, Nov 23, 2010 at 12:25:23PM -0700, .alyn.post. wrote:
> The bootstrap compiler is compiling the morphology and morphology
> header file, but I'm still working on the peg grammar itself.

Damn.  That's a lot of work; good luck!

> Given that Lojban is used as an example of a complex PEG grammar:
> 
>   http://en.wikipedia.org/wiki/Parsing_expression_grammar#External_links

Lojban is almost certainly the most complex fully regular (except
ZOi) grammar in actual use in the world.  The only time you might
get something worse is regularized versions of natlang grammars.
Lojban's grammar is something like 10x the size of most programming
languages.

> I'm not sure it's a bad idea to have a peg parser generator
> written specifically to parse Lojban.  

It's certainly a great test-to-destruction choice.  :)  Throw the
entirety of {la .alis.} at it in one pass, for example.  :)

> I do wish there had been something available already, but I'm not
> aware of Scheme code that parsers PEG files--they all seem to want
> to write the grammar definition in Scheme itself.

Well, you could always write a pre-processor to output Scheme from a
common PEG format.

Honestly, whatever we end up with in terms of the PEG grammar we
declare as the formalized This ... Is ... Lojban!!! (assuming we do
so), it's going to be "wrong" in the sense that you'll have to
process it to get a working input file for whatever parser generator
you're *actually* using.  I don't really see any way to avoid that,
although the NORATS and so on were intended to encode some
meta-parser sorts of information about certain productions.

-Robin

-- 
http://singinst.org/ :  Our last, best hope for a fantastic future.
Lojban (http://www.lojban.org/): The language in which "this parrot
is dead" is "ti poi spitaki cu morsi", but "this sentence is false"
is "na nei".   My personal page: http://www.digitalkingdom.org/rlp/

-- 
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.