If you use the uu-parsing libraries you will get a breadth-first search,
instead of a non-backtrcaking depth-first search of Parsec; furthermore you do
not suffer from space leaks and get your results online. In addition you get
error correction, with high-quality error messages.
The
Hi Erik
Malcolm Wallace describes a commit combinator in the paper Partial
parsing: combining choice with commitment which sounds like what you
would want. It is implemented for Polyparse rather than Parsec though.
From a quick scan of the paper and code, the implementation appears to
be built
Stephen Tetley stephen.tet...@gmail.com writes:
Hi Erik
Malcolm Wallace describes a commit combinator in the paper Partial
parsing: combining choice with commitment which sounds like what you
would want. It is implemented for Polyparse rather than Parsec though.
From a quick scan of the
Stephen Tetley wrote:
Malcolm Wallace describes a commit combinator in the paper Partial
parsing: combining choice with commitment which sounds like what you
would want. It is implemented for Polyparse rather than Parsec though.
Yes, I can see how that might help on some kinds of data.
Ivan Lazar Miljenovic wrote:
From the Polyparse homepage (http://www.cs.york.ac.uk/fp/polyparse/):
,
| If you are familiar with the Parsec library, then the key insight for
| using PolyParse is that the two libraries' approach to backtracking
| are the duals of each another. In Parsec, you
Hi all,
I'm reading John Hughes' paper Generalizing Monads to Arrows and found
the statement regarding parser combinators:
... depend on the programmer using an additional combinator similar
to Prolog's 'cut' operator do declare that a parser need never
backtrack beyond a certain point.
On Tue, Jun 29, 2010 at 10:26 PM, Erik de Castro Lopo
mle...@mega-nerd.com wrote:
Hi all,
I'm reading John Hughes' paper Generalizing Monads to Arrows and found
the statement regarding parser combinators:
... depend on the programmer using an additional combinator similar
to Prolog's
Antoine Latter wrote:
For Parsec, in the absence of the try combinator, a parser will
never back-track once it consumes a portion of the input.
Thanks for reminding me.
If try is pushed out into the leaves of you parser, you shouldn't
run in to too much trouble with excessive backtracking.