happy-lib:frontend
Safe HaskellNone
LanguageHaskell98

Happy.Frontend.AbsSyn

Synopsis

Documentation

data BookendedAbsSyn Source #

Constructors

BookendedAbsSyn (Maybe String) (Maybe String) (AbsSyn String) (Maybe String) 

data AbsSyn e Source #

Constructors

AbsSyn [Directive String] [Rule e] 

data Directive a Source #

Constructors

TokenType String 
TokenSpec [(a, TokenSpec)] 
TokenName String (Maybe String) Bool 
TokenLexer String String 
TokenImportedIdentity 
TokenMonad String String String String 
TokenNonassoc [String] 
TokenRight [String] 
TokenLeft [String] 
TokenExpect Int 
TokenError String (Maybe String) 
TokenErrorExpected 
TokenErrorHandlerType String 
TokenAttributetype String 
TokenAttribute String String 

Instances

Instances details
Show a => Show (Directive a) Source # 
Instance details

Defined in Happy.Frontend.AbsSyn

Methods

showsPrec :: Int -> Directive a -> ShowS

show :: Directive a -> String

showList :: [Directive a] -> ShowS

Eq a => Eq (Directive a) Source # 
Instance details

Defined in Happy.Frontend.AbsSyn

Methods

(==) :: Directive a -> Directive a -> Bool

(/=) :: Directive a -> Directive a -> Bool

getTokenType :: [Directive t] -> String Source #

getLexer :: [Directive t] -> Maybe (String, String) Source #

getMonad :: [Directive t] -> (Bool, String, String, String, String) Source #

getPrioNames :: Directive t -> [String] Source #

getExpect :: [Directive t] -> Maybe Int Source #

getErrorExpectedMode :: Eq t => [Directive t] -> ErrorExpectedMode Source #

getAttributes :: [Directive t] -> [(String, String)] Source #

getAttributetype :: [Directive t] -> Maybe String Source #

getAttributeGrammarExtras :: [Directive t] -> Maybe AttributeGrammarExtras Source #

parseTokenSpec :: String -> TokenSpec Source #

Parse a token spec.

The first occurence of $$ indicates an expression in which the $$ will be substituted for the actual lexed token. $$ in string or char literals ('".."' and '\'.'') however does not count.

data Rule e Source #

Constructors

Rule String [String] [Prod e] (Maybe String) 

data Prod e Source #

Constructors

Prod [Term] e Int Prec 

data Term Source #

Constructors

App String [Term] 

data Prec Source #

Constructors

PrecNone 
PrecShift 
PrecId String 

Instances

Instances details
Show Prec Source # 
Instance details

Defined in Happy.Frontend.AbsSyn

Methods

showsPrec :: Int -> Prec -> ShowS

show :: Prec -> String

showList :: [Prec] -> ShowS

data TokenSpec #

Constructors

TokenFixed String 
TokenWithValue ExpressionWithHole 

Instances

Instances details
Show TokenSpec # 
Instance details

Defined in Happy.Grammar

Methods

showsPrec :: Int -> TokenSpec -> ShowS

show :: TokenSpec -> String

showList :: [TokenSpec] -> ShowS

Eq TokenSpec # 
Instance details

Defined in Happy.Grammar

Methods

(==) :: TokenSpec -> TokenSpec -> Bool

(/=) :: TokenSpec -> TokenSpec -> Bool