WikiDiscuss

WikiDiscuss


PEG Morphology Algorithm

On Fri, Dec 17, 2004 at 09:41:57PM -0500, Pierre Abbat wrote:
> On Friday 17 December 2004 21:22, jkominek@miranda.org wrote:
> > Parsing Expression Grammars are just another formalism like Context
> > Free Grammars. Once the grammar is written, there won't be any reason
> > to write your own morphology parser. You'll take a parser generator
> > for the desired language, and you'll run it on the grammar. It will
> > produce code you don't have to test.
> >
> > If you're considering writing your own parsing code to duplicate the
> > effect of what is described by the grammar, well, you can entertain
> > yourself however you please. But don't ask the rest of us to suffer
> > for it.

That didn't come out quite the way I wanted, but, shrug.

> I've already written valfendi, and I did not do it to entertain myself.

No, not many people write parsers by hand any more, for fun, or
otherwise. Lets stick with describing the morphology in a fashion
readily fed into parser generators, so that developers can get
guaranteed correctness easily. A English algorithm description
condemns them to duplicating effort for potentially dubious and
difficult to verify results.

(As an aside, I'm already working on a PEG parser generator which
produces C. It mostly works already, and if there is interest, I can
also produce a parser generator/parser combo more suited to
interactive debugging of the grammar.)

--
Jay Kominek <jkominek@miranda.org>