Sciweavers

IFL
2007
Springer

Partial Parsing: Combining Choice with Commitment

13 years 10 months ago
Partial Parsing: Combining Choice with Commitment
Abstract. Parser combinators, often monadic, are a venerable and widelyused solution to read data from some external format. However, the capability to return a partial parse has, until now, been largely missing. When only a small portion of the entire data is desired, it has been necessary either to parse the entire input in any case, or to break up the grammar into smaller pieces and move some work outside the world of combinators. This paper presents a technique for mixing lazy, demand-driven, parsing with strict parsing, all within the same set of combinators. The grammar specification remains complete and unbroken, yet only sufficient input is consumed to satisfy the result demanded. It is built on a combination of applicative and monadic parsers. Monadic parsing alone is insufficient to allow a choice operator to coexist with the early commitment needed for lazy results. Applicative parsing alone can give partial results, but does not permit context-sensitive grammars. But used ...
Malcolm Wallace
Added 08 Jun 2010
Updated 08 Jun 2010
Type Conference
Year 2007
Where IFL
Authors Malcolm Wallace
Comments (0)