happy-lib-2.1.5: Happy is a parser generator for Haskell implemented using this library
Safe HaskellNone
LanguageHaskell98

Happy.Tabular.LALR

Documentation

genActionTable :: Grammar e -> ([Name] -> NameSet) -> [Lr1State] -> ActionTable #

genLR0items :: Grammar e -> (Name -> RuleList) -> [ItemSetWithGotos] #

precalcClosure0 :: Grammar e -> Name -> RuleList #

propLookaheads #

Arguments

:: Grammar e 
-> [ItemSetWithGotos]

LR(0) kernel sets

-> ([Name] -> NameSet)

First function

-> ([(Int, Lr0Item, NameSet)], Array Int [(Lr0Item, Int, Lr0Item)]) 

mergeLookaheadInfo #

Arguments

:: Array Int [(Lr0Item, NameSet)]

lookahead info

-> [ItemSetWithGotos]

state table

-> [Lr1State] 

data Lr0Item #

Constructors

Lr0 !Int !Int 

Instances

Instances details
Show Lr0Item # 
Instance details

Defined in Happy.Tabular.LALR

Eq Lr0Item # 
Instance details

Defined in Happy.Tabular.LALR

Methods

(==) :: Lr0Item -> Lr0Item -> Bool #

(/=) :: Lr0Item -> Lr0Item -> Bool #

Ord Lr0Item # 
Instance details

Defined in Happy.Tabular.LALR

data Lr1Item #

Constructors

Lr1 !Int !Int NameSet 

Instances

Instances details
Show Lr1Item # 
Instance details

Defined in Happy.Tabular.LALR

type ItemSetWithGotos = (Set Lr0Item, [(Name, Int)]) #

data LRAction #

Instances

Instances details
Show LRAction # 
Instance details

Defined in Happy.Tabular.LALR

Eq LRAction # 
Instance details

Defined in Happy.Tabular.LALR

type Lr1State = ([Lr1Item], [(Name, Int)]) #

type GotoTable = Array Int (Array Name Goto) #

data Goto #

Constructors

Goto Int 
NoGoto 

Instances

Instances details
Show Goto # 
Instance details

Defined in Happy.Tabular.LALR

Methods

showsPrec :: Int -> Goto -> ShowS #

show :: Goto -> String #

showList :: [Goto] -> ShowS #

Eq Goto # 
Instance details

Defined in Happy.Tabular.LALR

Methods

(==) :: Goto -> Goto -> Bool #

(/=) :: Goto -> Goto -> Bool #