happy-lib:grammar
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

Methods

succ :: Name -> Name

pred :: Name -> Name

toEnum :: Int -> Name

fromEnum :: Name -> Int

enumFrom :: Name -> [Name]

enumFromThen :: Name -> Name -> [Name]

enumFromTo :: Name -> Name -> [Name]

enumFromThenTo :: Name -> Name -> Name -> [Name]

Ix Name Source # 
Instance details

Defined in Happy.Grammar

Methods

range :: (Name, Name) -> [Name]

index :: (Name, Name) -> Name -> Int

unsafeIndex :: (Name, Name) -> Name -> Int

inRange :: (Name, Name) -> Name -> Bool

rangeSize :: (Name, Name) -> Int

unsafeRangeSize :: (Name, Name) -> Int

Read Name Source # 
Instance details

Defined in Happy.Grammar

Methods

readsPrec :: Int -> ReadS Name

readList :: ReadS [Name]

readPrec :: ReadPrec Name

readListPrec :: ReadPrec [Name]

Show Name Source # 
Instance details

Defined in Happy.Grammar

Methods

showsPrec :: Int -> Name -> ShowS

show :: Name -> String

showList :: [Name] -> ShowS

Eq Name Source # 
Instance details

Defined in Happy.Grammar

Methods

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

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

Ord Name Source # 
Instance details

Defined in Happy.Grammar

Methods

compare :: Name -> Name -> Ordering

(<) :: Name -> Name -> Bool

(<=) :: Name -> Name -> Bool

(>) :: Name -> Name -> Bool

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

max :: Name -> Name -> Name

min :: Name -> Name -> Name

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

show :: Production eliminator -> String

showList :: [Production eliminator] -> ShowS

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

Methods

showsPrec :: Int -> TokenSpec -> ShowS

show :: TokenSpec -> String

showList :: [TokenSpec] -> ShowS

Eq TokenSpec Source # 
Instance details

Defined in Happy.Grammar

Methods

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

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

data Grammar eliminator Source #

Constructors

Grammar 

Fields

Instances

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

Defined in Happy.Grammar

Methods

showsPrec :: Int -> Grammar eliminator -> ShowS

show :: Grammar eliminator -> String

showList :: [Grammar eliminator] -> ShowS

data AttributeGrammarExtras Source #

Constructors

AttributeGrammarExtras 

Fields

data Priority Source #

Constructors

No 
Prio Assoc Int 
PrioLowest 

Instances

Instances details
Show Priority Source # 
Instance details

Defined in Happy.Grammar

Methods

showsPrec :: Int -> Priority -> ShowS

show :: Priority -> String

showList :: [Priority] -> ShowS

Eq Priority Source # 
Instance details

Defined in Happy.Grammar

Methods

(==) :: Priority -> Priority -> Bool

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

data Assoc Source #

Constructors

LeftAssoc 
RightAssoc 
None 

Instances

Instances details
Show Assoc Source # 
Instance details

Defined in Happy.Grammar

Methods

showsPrec :: Int -> Assoc -> ShowS

show :: Assoc -> String

showList :: [Assoc] -> ShowS

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

errorName :: String Source #

catchName :: String Source #

startName :: String Source #

dummyName :: String Source #

eofName :: String Source #