bnfc

CF

Documentation

type CF = (Exts, [Rule])

type Rule = (Fun, (Cat, [Either Cat String]))

type Literal = Cat

type Symbol = String

type Cat = String

type Fun = String

newtype Tree

Constructors

Tree (Fun, [Tree]) 

type Data = (Cat, [(Fun, [Cat])])

cf2data :: CF -> [Data]

allCats :: CF -> [Cat]

reservedWords :: CFG f -> [String]

symbols :: CFG f -> [String]

literals :: CFG f -> [Cat]

reversibleCats :: CFG f -> [Cat]

valCat :: Rul f -> Cat

isParsable :: Rul f -> Bool

rulesOfCF :: CF -> [Rule]

rulesForCat :: CF -> Cat -> [Rule]

ruleGroups :: CF -> [(Cat, [Rule])]

revSepListRule :: Rul f -> Rul f

rhsRule :: Rul f -> [Either Cat String]

comments :: CF -> ([(String, String)], [String])

tokenPragmas :: CFG f -> [(String, Reg)]

precLevels :: CF -> [Int]

precCF :: CF -> Bool

isUsedCat :: CF -> Cat -> Bool

isPositionCat :: CFG f -> Cat -> Bool

type CFP = (Exts, [RuleP])

type RuleP = (FunP, (Cat, [Either Cat String]))

type FunP = (Fun, Prof)

type Prof = (Fun, [([[Int]], [Int])])

cf2cfp :: CF -> CFP

cfp2cf :: CFP -> CF

trivialProf :: [Either Cat String] -> [([[Int]], [Int])]

ruleGroupsP :: CFP -> [(Cat, [RuleP])]

allCatsP :: CFP -> [Cat]