The kangaroo package

[Tags: bsd3, library]

Binary parsing with random access. The target file to be parsed is loaded into memory at the start (represented as an IOUArray Int Word8). Parsing proceeds by moving a cursor around, the array is left intact. This allows _jumping_ inside the file and contrasts with other parser combinators that progress via consuming input.

* Caveat * - the above of course means that the target file is obliged to be small enough to fit into memory.

** MAJOR CAVEAT ** - kangaroo is somewhat half-baked (maybe now two thirds baked). The parsing machinery seems good but the combinators need more work. It's on Hackage because I'm using it with Hurdle which was already on Hackage and the techinique of moving a cursor rather than consuming input seems at least interesting.

Currently kangaroo is twinned with its own library of formatting combinators (JoinPrint), at some point this is may go in its a separate package.

Changelog:

0.4.0 Changed JoinPrint to have distinct types for single-line documents (Doc) and multi-line documents (VDoc). This is because single-line docs track their horizontal length.

Added a skip primitive to the Parse Monad. Added local and asks to the Reader top-level modules.

0.3.0 Documented the primitive parsers. char renamed anyChar to match Parsec's convention. Rationalized exports from ParseMonad module.

0.2.0 Changes to ParseMonad - parsing within a region simplified, temporarily added JoinPrint.

0.1.0 First version.


Properties

Versions0.1.0, 0.2.0, 0.3.0, 0.4.0
Dependenciesarray (>=0.2.0.0 && <0.4), base (<5)
LicenseBSD3
CopyrightStephen Tetley <stephen.tetley@gmail.com>
MaintainerStephen Tetley <stephen.tetley@gmail.com>
Stabilityhalf baked
CategoryParsing
Home pagehttp://code.google.com/p/copperbox/
Upload dateTue Feb 23 11:40:52 UTC 2010
Uploaded byStephenTetley
Downloads218 total (16 in last 30 days)

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees