BNFC-meta-0.5: Deriving Parsers and Quasi-Quoters from BNF Grammars

Safe HaskellNone
LanguageHaskell98

Language.LBNF.Grammar

Documentation

myLexer :: String -> [Token] Source #

tokens :: String -> [Token] Source #

pListDef :: [Token] -> ParseMonad [Def] Source #

pListItem :: [Token] -> ParseMonad [Item] Source #

pDef :: [Token] -> ParseMonad Def Source #

pRHS :: [Token] -> ParseMonad RHS Source #

pListRHS :: [Token] -> ParseMonad [RHS] Source #

pItem :: [Token] -> ParseMonad Item Source #

pCat :: [Token] -> ParseMonad Cat Source #

pCat1 :: [Token] -> ParseMonad Cat Source #

pArg :: [Token] -> ParseMonad Arg Source #

pListArg :: [Token] -> ParseMonad [Arg] Source #

pExp :: [Token] -> ParseMonad Exp Source #

pExp1 :: [Token] -> ParseMonad Exp Source #

pExp2 :: [Token] -> ParseMonad Exp Source #

pListExp2 :: [Token] -> ParseMonad [Exp] Source #

pListExp :: [Token] -> ParseMonad [Exp] Source #

pReg2 :: [Token] -> ParseMonad Reg Source #

pReg1 :: [Token] -> ParseMonad Reg Source #

pReg3 :: [Token] -> ParseMonad Reg Source #

pReg :: [Token] -> ParseMonad Reg Source #

data RHS Source #

Constructors

RHS [Item] 
TRHS Reg 

Instances

Eq RHS Source # 

Methods

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

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

Ord RHS Source # 

Methods

compare :: RHS -> RHS -> Ordering #

(<) :: RHS -> RHS -> Bool #

(<=) :: RHS -> RHS -> Bool #

(>) :: RHS -> RHS -> Bool #

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

max :: RHS -> RHS -> RHS #

min :: RHS -> RHS -> RHS #

Show RHS Source # 

Methods

showsPrec :: Int -> RHS -> ShowS #

show :: RHS -> String #

showList :: [RHS] -> ShowS #

Print RHS Source # 

Methods

prt :: Int -> RHS -> Doc Source #

prtList :: [RHS] -> Doc Source #

data Item Source #

Constructors

Terminal String 
NTerminal Cat 

Instances

Eq Item Source # 

Methods

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

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

Ord Item Source # 

Methods

compare :: Item -> Item -> Ordering #

(<) :: Item -> Item -> Bool #

(<=) :: Item -> Item -> Bool #

(>) :: Item -> Item -> Bool #

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

max :: Item -> Item -> Item #

min :: Item -> Item -> Item #

Show Item Source # 

Methods

showsPrec :: Int -> Item -> ShowS #

show :: Item -> String #

showList :: [Item] -> ShowS #

Print Item Source # 

Methods

prt :: Int -> Item -> Doc Source #

prtList :: [Item] -> Doc Source #

data Cat Source #

Constructors

OptCat Cat 
ListCat Cat 
IdCat Ident 

Instances

Eq Cat Source # 

Methods

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

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

Ord Cat Source # 

Methods

compare :: Cat -> Cat -> Ordering #

(<) :: Cat -> Cat -> Bool #

(<=) :: Cat -> Cat -> Bool #

(>) :: Cat -> Cat -> Bool #

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

max :: Cat -> Cat -> Cat #

min :: Cat -> Cat -> Cat #

Show Cat Source # 

Methods

showsPrec :: Int -> Cat -> ShowS #

show :: Cat -> String #

showList :: [Cat] -> ShowS #

Print Cat Source # 

Methods

prt :: Int -> Cat -> Doc Source #

prtList :: [Cat] -> Doc Source #

data Label Source #

Constructors

Id Ident 
Wild 
ListE 
ListCons 
ListOne 
Aq MIdent 

Instances

Eq Label Source # 

Methods

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

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

Ord Label Source # 

Methods

compare :: Label -> Label -> Ordering #

(<) :: Label -> Label -> Bool #

(<=) :: Label -> Label -> Bool #

(>) :: Label -> Label -> Bool #

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

max :: Label -> Label -> Label #

min :: Label -> Label -> Label #

Show Label Source # 

Methods

showsPrec :: Int -> Label -> ShowS #

show :: Label -> String #

showList :: [Label] -> ShowS #

Print Label Source # 

Methods

prt :: Int -> Label -> Doc Source #

prtList :: [Label] -> Doc Source #

data HsTyp Source #

Instances

Eq HsTyp Source # 

Methods

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

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

Ord HsTyp Source # 

Methods

compare :: HsTyp -> HsTyp -> Ordering #

(<) :: HsTyp -> HsTyp -> Bool #

(<=) :: HsTyp -> HsTyp -> Bool #

(>) :: HsTyp -> HsTyp -> Bool #

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

max :: HsTyp -> HsTyp -> HsTyp #

min :: HsTyp -> HsTyp -> HsTyp #

Show HsTyp Source # 

Methods

showsPrec :: Int -> HsTyp -> ShowS #

show :: HsTyp -> String #

showList :: [HsTyp] -> ShowS #

Print HsTyp Source # 

Methods

prt :: Int -> HsTyp -> Doc Source #

prtList :: [HsTyp] -> Doc Source #

data Arg Source #

Constructors

Arg Ident 

Instances

Eq Arg Source # 

Methods

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

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

Ord Arg Source # 

Methods

compare :: Arg -> Arg -> Ordering #

(<) :: Arg -> Arg -> Bool #

(<=) :: Arg -> Arg -> Bool #

(>) :: Arg -> Arg -> Bool #

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

max :: Arg -> Arg -> Arg #

min :: Arg -> Arg -> Arg #

Show Arg Source # 

Methods

showsPrec :: Int -> Arg -> ShowS #

show :: Arg -> String #

showList :: [Arg] -> ShowS #

Print Arg Source # 

Methods

prt :: Int -> Arg -> Doc Source #

prtList :: [Arg] -> Doc Source #

data Exp Source #

Instances

Eq Exp Source # 

Methods

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

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

Ord Exp Source # 

Methods

compare :: Exp -> Exp -> Ordering #

(<) :: Exp -> Exp -> Bool #

(<=) :: Exp -> Exp -> Bool #

(>) :: Exp -> Exp -> Bool #

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

max :: Exp -> Exp -> Exp #

min :: Exp -> Exp -> Exp #

Show Exp Source # 

Methods

showsPrec :: Int -> Exp -> ShowS #

show :: Exp -> String #

showList :: [Exp] -> ShowS #

Print Exp Source # 

Methods

prt :: Int -> Exp -> Doc Source #

prtList :: [Exp] -> Doc Source #

data Reg Source #

Instances

Eq Reg Source # 

Methods

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

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

Ord Reg Source # 

Methods

compare :: Reg -> Reg -> Ordering #

(<) :: Reg -> Reg -> Bool #

(<=) :: Reg -> Reg -> Bool #

(>) :: Reg -> Reg -> Bool #

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

max :: Reg -> Reg -> Reg #

min :: Reg -> Reg -> Reg #

Show Reg Source # 

Methods

showsPrec :: Int -> Reg -> ShowS #

show :: Reg -> String #

showList :: [Reg] -> ShowS #

Print Reg Source # 

Methods

prt :: Int -> Reg -> Doc Source #

prtList :: [Reg] -> Doc Source #

newtype Ident Source #

Constructors

Ident String 

Instances

Eq Ident Source # 

Methods

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

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

Ord Ident Source # 

Methods

compare :: Ident -> Ident -> Ordering #

(<) :: Ident -> Ident -> Bool #

(<=) :: Ident -> Ident -> Bool #

(>) :: Ident -> Ident -> Bool #

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

max :: Ident -> Ident -> Ident #

min :: Ident -> Ident -> Ident #

Show Ident Source # 

Methods

showsPrec :: Int -> Ident -> ShowS #

show :: Ident -> String #

showList :: [Ident] -> ShowS #

Print Ident Source # 

Methods

prt :: Int -> Ident -> Doc Source #

prtList :: [Ident] -> Doc Source #