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

Happy.Grammar

Description

This module exports the Grammar data type, which

Synopsis

Documentation

newtype Name Source #

Constructors

MkName 

Fields

Instances

Instances details
Enum Name Source # 
Instance details

Defined in Happy.Grammar

Ix Name Source # 
Instance details

Defined in Happy.Grammar

Read Name Source # 
Instance details

Defined in Happy.Grammar

Show Name Source # 
Instance details

Defined in Happy.Grammar

Eq Name Source # 
Instance details

Defined in Happy.Grammar

Methods

(==) :: Name -> Name -> Bool Source #

(/=) :: Name -> Name -> Bool Source #

Ord Name Source # 
Instance details

Defined in Happy.Grammar

data Production eliminator Source #

Constructors

Production Name [Name] (eliminator, [Int]) Priority 

Instances

Instances details
Show eliminator => Show (Production eliminator) Source # 
Instance details

Defined in Happy.Grammar

Methods

showsPrec :: Int -> Production eliminator -> ShowS Source #

show :: Production eliminator -> String Source #

showList :: [Production eliminator] -> ShowS Source #

data TokenSpec Source #

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 Source # 
Instance details

Defined in Happy.Grammar

Eq TokenSpec Source # 
Instance details

Defined in Happy.Grammar

data Grammar eliminator Source #

Instances

Instances details
Show eliminator => Show (Grammar eliminator) Source # 
Instance details

Defined in Happy.Grammar

Methods

showsPrec :: Int -> Grammar eliminator -> ShowS Source #

show :: Grammar eliminator -> String Source #

showList :: [Grammar eliminator] -> ShowS Source #

data Priority Source #

Constructors

No 
Prio Assoc Int 
PrioLowest 

Instances

Instances details
Show Priority Source # 
Instance details

Defined in Happy.Grammar

Eq Priority Source # 
Instance details

Defined in Happy.Grammar

data Assoc Source #

Constructors

LeftAssoc 
RightAssoc 
None 

Instances

Instances details
Show Assoc Source # 
Instance details

Defined in Happy.Grammar

data ErrorHandlerInfo Source #

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.

data ErrorExpectedMode Source #

Constructors

NoExpected

Neither `%errorhandertype explist` nor `%error.expected`

OldExpected

`%errorhandertype explist`. The error handler takes a pair `(Token, [String])`

NewExpected

`%error.expected`. The error handler takes two (or more) args `Token -> [String] -> ...`.

Instances

Instances details
Eq ErrorExpectedMode Source # 
Instance details

Defined in Happy.Grammar

data Directives Source #

Stuff like `%monad`, `%expect`

Constructors

Directives 

Fields