FormalGrammars-0.3.1.2: (Context-free) grammars in formal language theory

Safe HaskellNone
LanguageHaskell2010

FormalLanguage.CFG.TH

Description

Template Haskell system for translating formal grammars into real Haskell code based on ADPfusion.

If you want automatic algebra products, ADPfusion provides these. makeAlgebraProductH ['h] ''SigName where SigName is the auto-generted signature name, will generate the algebra product.

When will build the grammar, the types and variables are newNames while attribute functions names are deterministic and potentially non-unique.

Synopsis

Documentation

thCodeGen :: Int -> Grammar -> Q [Dec] Source #

Entry point for generation of Grammar and Signature code. Will also stuff the Grammar into the state data. A bunch of TH names are generated here and become part of the state, as they are used in multiple places.