Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Analysis of a context-free grammar
Synopsis
- data Analysis t nt = Analysis {
- baseCfg :: FreeCfg t nt
- augmentedCfg :: FreeCfg (AugT t) (AugNT nt)
- nullables :: Set (AugNT nt)
- firstSet :: AugNT nt -> LookaheadSet t
- firstsOfVs :: AugVs t nt -> LookaheadSet t
- followSet :: AugNT nt -> LookaheadSet t
- predictSet :: AugProduction t nt -> LookaheadSet t
- isLL1 :: Bool
- ll1Info :: AugNT nt -> Predictions t nt
- mkAnalysis :: forall cfg t nt. (Cfg cfg t nt, Ord nt, Ord t) => cfg t nt -> Analysis t nt
- type Prediction t nt = (LookaheadSet t, Set (AugProduction t nt))
- type Predictions t nt = Set (Prediction t nt)
Documentation
Analysis of a context-free grammar
Analysis | |
|
mkAnalysis :: forall cfg t nt. (Cfg cfg t nt, Ord nt, Ord t) => cfg t nt -> Analysis t nt Source #
Analyzes a context-free grammar
type Prediction t nt = (LookaheadSet t, Set (AugProduction t nt)) Source #
A lookahead set with the productions it predicts
type Predictions t nt = Set (Prediction t nt) Source #
A set of Prediction
s. The LookaheadSet
s of the Prediction
s
will be pairwise disjoint.