Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell98 |
Happy.Grammar
Description
This module exports the Grammar
data type, which
Synopsis
- type Name = Int
- data Production = Production Name [Name] (String, [Int]) Priority
- data Grammar = Grammar {
- productions :: [Production]
- lookupProdNo :: Int -> Production
- lookupProdsOfName :: Name -> [Int]
- token_specs :: [(Name, String)]
- terminals :: [Name]
- non_terminals :: [Name]
- starts :: [(String, Name, Name, Bool)]
- types :: Array Int (Maybe String)
- token_names :: Array Int String
- first_nonterm :: Name
- first_term :: Name
- eof_term :: Name
- priorities :: [(Name, Priority)]
- attributes :: [(String, String)]
- attributetype :: String
- data Priority
- = No
- | Prio Assoc Int
- | PrioLowest
- data Assoc
- = LeftAssoc
- | RightAssoc
- | None
- data Pragmas = Pragmas {
- token_type :: String
- imported_identity :: Bool
- monad :: (Bool, String, String, String, String)
- expect :: Maybe Int
- lexer :: Maybe (String, String)
- error_handler :: Maybe String
- error_sig :: ErrorHandlerType
- data ErrorHandlerType
- errorName :: String
- errorTok :: Name
- startName :: String
- dummyName :: String
- firstStartTok :: Name
- dummyTok :: Name
- eofName :: String
- epsilonTok :: Name
- mapDollarDollar :: String -> Maybe (String -> String)
Documentation
data Production Source #
Constructors
Production Name [Name] (String, [Int]) Priority |
Instances
Show Production Source # | |
Defined in Happy.Grammar Methods showsPrec :: Int -> Production -> ShowS show :: Production -> String showList :: [Production] -> ShowS |
Constructors
Grammar | |
Fields
|
Constructors
No | |
Prio Assoc Int | |
PrioLowest |
Constructors
LeftAssoc | |
RightAssoc | |
None |
Stuff like `%monad`, `%expect`
Constructors
Pragmas | |
Fields
|
data ErrorHandlerType Source #
Constructors
ErrorHandlerTypeDefault | |
ErrorHandlerTypeExpList |
firstStartTok :: Name Source #
epsilonTok :: Name Source #
mapDollarDollar :: String -> Maybe (String -> String) Source #