Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Augmented grammars.
- augmentCfg :: forall cfg t nt. (Cfg cfg t nt, Ord nt, Ord t) => cfg t nt -> FreeCfg (AugT t) (AugNT nt)
- data AugNT nt
- = StartSymbol
- | AugNT nt
- data AugT t
- type AugV t nt = V (AugT t) (AugNT nt)
- type AugVs t nt = Vs (AugT t) (AugNT nt)
- type AugProduction t nt = Production (AugT t) (AugNT nt)
- type AugFreeCfg t nt = FreeCfg (AugT t) (AugNT nt)
Augmenting grammars
augmentCfg :: forall cfg t nt. (Cfg cfg t nt, Ord nt, Ord t) => cfg t nt -> FreeCfg (AugT t) (AugNT nt) Source
Returns the augmented grammar: a grammar for the same language but using explicit start and end-of-file symbols.
Augmenting symbols
Nonterminal symbols augmented with a special StartSymbol
StartSymbol | |
AugNT nt |
Terminal symbols augmented with a special end-of-file symbol
Type synonyms
type AugV t nt = V (AugT t) (AugNT nt) Source
A convenience synonym for an augmented vocabulary symbol
type AugVs t nt = Vs (AugT t) (AugNT nt) Source
A convenience synonym for augmented vocabulary symbols
type AugProduction t nt = Production (AugT t) (AugNT nt) Source
A convenience synonym for augmented productions
type AugFreeCfg t nt = FreeCfg (AugT t) (AugNT nt) Source
A convenience symbol for an augmented grammar