Mailing List Archive

Lexing/parsing
"Eric S. Raymond" wrote:
>
> ...
>
> Yes, this would be a good thing. I'm also talking with John Aycock about
> his elegant SPARK toolkit for generating Earley-algorithm parsers. Once that
> comes out of beta, I would consider it a core-library candidate.

I pointed one of my co-workers at Spark and he loved the lexer but said
that the parser ended up being too slow to be useful. I didn't know
enough about the Earley-algorithm to suggest how he could re-organize
his grammar to optimize for it. If naive Python programmers cannot
generate usable parsers then it may not be appropriate for the standard
library.
--
Paul Prescod - Not encumbered by corporate consensus
The calculus and the rich body of mathematical analysis to which it
gave rise made modern science possible, but it was the algorithm that
made the modern world possible.
- The Advent of the Algorithm (pending), by David Berlinski
Re: Lexing/parsing [ In reply to ]
Paul Prescod <paul@prescod.net>:
> I pointed one of my co-workers at Spark and he loved the lexer but said
> that the parser ended up being too slow to be useful. I didn't know
> enough about the Earley-algorithm to suggest how he could re-organize
> his grammar to optimize for it. If naive Python programmers cannot
> generate usable parsers then it may not be appropriate for the standard
> library.

I'm using a SPARK-generated parser plus shlex in CML2. This does not seem
to create a speed problem.
--
<a href="http://www.tuxedo.org/~esr">Eric S. Raymond</a>

No kingdom can be secured otherwise than by arming the people. The possession
of arms is the distinction between a freeman and a slave.
-- "Political Disquisitions", a British republican tract of 1774-1775