syntax: Syntax descriptions for unified parsing and pretty-printing.
syntax allows you to write a single syntax description and instantiate is both as a parser and a pretty printer.
The interface is based on a custom Functor/Applicative/Monad hierarchy, provided by the
semi-iso package. You fmap using
a semi-isomorphism instead of function. A semi-isomorphism is a isomorphism that can fail in both directions, with slightly
weakened laws. It is worth to note that
lens are valid semi-isomorphisms :)
Once you write a description you can, for example turn it into an Attoparsec parser.
syntax-example for an example,
syntax-pretty for a parser/printer implementation.
The library was inspired by:
Rendel, Tillmann, and Klaus Ostermann. "Invertible syntax descriptions: unifying parsing and pretty printing." ACM Sigplan Notices. Vol. 45. No. 11. ACM, 2010.
a printer library based on Text/ByteString builders (wrapping
prettyis inefficient and doesn't use any features of it),
try to implement indentation and Haskell layout rule,
combinators for binary data formats, vectors,
implementation of do notation for SemiIsoMonad with QuasiQuoters.
|Versions [faq]||0.1.0.0, 0.1.1.0, 0.2.0.0, 0.2.1.0, 0.3.0.0, 18.104.22.168|
|Dependencies||base (==4.*), lens (>=4), mono-traversable, scientific (>=0.3), semi-iso (>=0.4.1) [details]|
|Copyright||Paweł Nowak 2014|
|Maintainer||Paweł Nowak <email@example.com>|
|Revised||Revision 1 made by pawel834 at Mon Nov 24 15:43:23 UTC 2014|
|Source repo||head: git clone firstname.lastname@example.org:Pawel834/syntax.git|
|Uploaded||by pawel834 at Mon Nov 24 15:42:16 UTC 2014|
|Downloads||2805 total (63 in the last 30 days)|
|Rating||(no votes yet) [estimated by rule of succession]|
Docs uploaded by user
Build status unknown [no reports yet]
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
For package maintainers and hackage trustees