Is pyparsing really a recursive descent parser?

Chris Mellon arkanes at gmail.com
Wed Nov 7 16:43:08 EST 2007


On Nov 7, 2007 3:15 PM, Just Another Victim of the Ambient Morality
<ihatespam at hotmail.com> wrote:

> > In short, it hasn't really evovled into a user-friendly package
> > yet.
>
>     Thank you.
>     How is it that I seem to be the only one in the market for a correct
> parser?  Earley has a runtine of O(n^3) in the worst case and O(n^2)
> typically.  I have trouble believing that everyone else in the world has
> such intense run-time requirements that they're willing to forego
> correctness.  Why can't I find a pyparsing-esque library with this
> implementation?  I'm tempted to roll my own except that it's a fairly
> complicated algorithm and I don't really understand how it's any more
> efficient than the naive approach...
>
>

You have an unusual definition of correctness. Many people would say
that an ambiguous grammar is a bug, not something to support.

In fact, I often use pyparsing precisely in order to disambiguate
(according to specific rules, which are embodied by the parser)
ambiguous input, like bizarre hand-entered datetime value.



More information about the Python-list mailing list