Grempa

Embedded grammar DSL and LALR parser generator

Latest on Hackage:0.2.2

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed by Olle Fredriksson
Maintained by [email protected]

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.