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

Happy.Frontend.AbsSyn

Synopsis

Documentation

data AbsSyn e #

Constructors

AbsSyn [Directive String] [Rule e] 

data ErrorHandlerInfo #

Constructors

DefaultErrorHandler

Default handler happyError

CustomErrorHandler String

Call this handler on error.

ResumptiveErrorHandler String String

`ResumptiveErrorHandler abort report`: Upon encountering a parse error, call non-fatal function report. Then try to resume parsing by finding a catch production. If that ultimately fails, call abort.

parseTokenSpec :: String -> TokenSpec #

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 #

Constructors

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

data Prod e #

Constructors

Prod [Term] e Int Prec 

data Term #

Constructors

App String [Term] 

data Prec #

Instances

Instances details
Show Prec # 
Instance details

Defined in Happy.Frontend.AbsSyn

Methods

showsPrec :: Int -> Prec -> ShowS #

show :: Prec -> String #

showList :: [Prec] -> ShowS #

data TokenSpec #

Constructors

TokenFixed String

The token is just a fixed value

TokenWithValue ExpressionWithHole

The token is an expression involving the value of the lexed token.

Instances

Instances details
Show TokenSpec 
Instance details

Defined in Happy.Grammar

Eq TokenSpec 
Instance details

Defined in Happy.Grammar