Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Happy.Tabular.LALR
Documentation
genActionTable :: Grammar -> ([Name] -> NameSet) -> [Lr1State] -> ActionTable Source #
genGotoTable :: Grammar -> [ItemSetWithGotos] -> GotoTable Source #
genLR0items :: Grammar -> (Name -> RuleList) -> [ItemSetWithGotos] Source #
precalcClosure0 :: Grammar -> Name -> RuleList Source #
calcLookaheads :: Int -> [(Int, Lr0Item, NameSet)] -> Array Int [(Lr0Item, Int, Lr0Item)] -> Array Int [(Lr0Item, NameSet)] Source #
Arguments
:: Array Int [(Lr0Item, NameSet)] | lookahead info |
-> [ItemSetWithGotos] | state table |
-> [Lr1State] |
countConflicts :: ActionTable -> (Array Int (Int, Int), (Int, Int)) Source #
type ItemSetWithGotos = (Set Lr0Item, [(Name, Int)]) Source #
Constructors
LR'Shift Int Priority | |
LR'Reduce Int Priority | |
LR'Accept | |
LR'Fail | |
LR'MustFail | |
LR'Multiple [LRAction] LRAction |
type ActionTable = Array Int (Array Int LRAction) Source #