[Haskell-cafe] [Ann] New version of parser combinator library uu-parsinglib-2.4.0

S. Doaitse Swierstra doaitse at swierstra.net
Wed Jul 21 17:01:46 EDT 2010


I have uploaded a new version of the package uu-parsinglib, te collection of online, error-correcting parser combinators, with both an applicative and a monadic interface.

* The new version behaves better when more than three corrective steps have to be taken at a specific position. In order ro do so we have added a form of abstract interpretation which computes the minimal length of each alternative, so the shortest one can be chosen (and not one of the recursive alternatives!).

* Furthermore we compute for each parser whether it can recognise the empty string. This is used to provide error messages when such parsers are used in list-like constructs, on of the most commonly made mistakes by innocent parser writers.

* a combinator <?> was added which can be used to label productions, and which label is used to report what was expected

* some further overloadings of pSym have been added which function at a lower level, thus leading to much faster parsers, especially when using the combinator  to construct scanner like parsers: e.g.

   spaces = pMunch (==' ')

makes sure that all spaces are skipped in a single go, instead of dealing with each recognised ' ' by itself.

I hope you like the extensions, and would be happy to hear from you, both if you use them successfully, or if you have any reason for not using them.

Doaitse Swierstra


More information about the Haskell-Cafe mailing list