The Grempa package

[Tags:bsd3, library]

A library for expressing programming language grammars in a form similar to BNF, which is extended with the semantic actions to take when a production has been parsed. The grammars are typed and are to be be used with the LALR(1) parser generator, also part of the library, which can generate a parser for the language either at compile time using Template Haskell, producing fast parsers with no initial runtime overhead, or dynamically, which has the initial overhead of generating the parser, but can be used for example when the grammar depends on an input.


[Skip to Readme]

Properties

Versions 0.1.0, 0.1.1, 0.1.2, 0.1.3, 0.2.0, 0.2.1, 0.2.2
Dependencies array (>=0.3 && <0.5), base (>=4.2 && <5), containers (>=0.3 && <0.5), mtl (==2.0.*), QuickCheck (==2.4.*), template-haskell (>=2.4 && <2.8), th-lift (==0.5.*) [details]
License BSD3
Copyright (c) 2011 Olle Fredriksson
Author Olle Fredriksson
Maintainer fredriksson.olle@gmail.com
Stability Experimental
Category Parsing
Uploaded Sat Feb 11 13:09:12 UTC 2012 by OlleFredriksson
Distributions NixOS:0.2.2
Downloads 1818 total (27 in the last 30 days)
Votes
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Flags

NameDescriptionDefaultType
testBuild the module for generating random inputs and the expected output for your grammars. Default: FalseEnabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for Grempa

Readme for Grempa-0.2.1

Grempa
Embedded grammar DSL and LALR parser generator
Author: Olle Fredriksson

* Building

    Use Cabal. Example:

    > cabal configure
    > cabal build
    > cabal install

* Documentation

    To generate the documentation for the different modules, use Cabal.

    > cabal configure
    > cabal haddock

    Also refer to the examples.

* Examples

    The examples directory contains examples of varying complexity which can be
    used as an introduction to the usage of the library.

    The examples are numbered, which serves as a suggested reading order.

* Testing

    To also compile the module for generating random inputs and their expected
    outputs for your grammar, and testing a generated parser against that, use the
    test flag. Example:

    > cabal configure -ftest
    > cabal build
    > cabal install

* Bugs

    If you find a bug, please send a bug report to fredriksson.olle@gmail.com.

* License

    Refer to the file LICENSE in this directory.