language-c-quote-0.13.0.2: C/CUDA/OpenCL/Objective-C quasiquoting library.
Copyright(c) 2006-2011 Harvard University
(c) 2011-2013 Geoffrey Mainland
LicenseBSD-style
Maintainermainland@drexel.edu
Safe HaskellNone
LanguageHaskell2010

Language.C.Parser.Monad

Description

 
Synopsis

Documentation

data P a Source #

Instances

Instances details
MonadException P Source # 
Instance details

Defined in Language.C.Parser.Monad

Methods

throw :: Exception e => e -> P a Source #

catch :: Exception e => P a -> (e -> P a) -> P a Source #

finally :: P a -> P b -> P a Source #

Applicative P Source # 
Instance details

Defined in Language.C.Parser.Monad

Methods

pure :: a -> P a

(<*>) :: P (a -> b) -> P a -> P b

liftA2 :: (a -> b -> c) -> P a -> P b -> P c

(*>) :: P a -> P b -> P b

(<*) :: P a -> P b -> P a

Functor P Source # 
Instance details

Defined in Language.C.Parser.Monad

Methods

fmap :: (a -> b) -> P a -> P b

(<$) :: a -> P b -> P a

Monad P Source # 
Instance details

Defined in Language.C.Parser.Monad

Methods

(>>=) :: P a -> (a -> P b) -> P b

(>>) :: P a -> P b -> P b

return :: a -> P a

MonadFail P Source # 
Instance details

Defined in Language.C.Parser.Monad

Methods

fail :: String -> P a

MonadState PState P Source # 
Instance details

Defined in Language.C.Parser.Monad

Methods

get :: P PState

put :: PState -> P ()

state :: (PState -> (a, PState)) -> P a

runP :: P a -> PState -> Either SomeException (a, PState) Source #

evalP :: P a -> PState -> Either SomeException a Source #

data PState Source #

Instances

Instances details
MonadState PState P Source # 
Instance details

Defined in Language.C.Parser.Monad

Methods

get :: P PState

put :: PState -> P ()

state :: (PState -> (a, PState)) -> P a

emptyPState :: [Extensions] -> [String] -> ByteString -> Maybe Pos -> PState Source #

pushLexState :: Int -> P () Source #

addTypedef :: String -> P () Source #

addClassdef :: String -> P () Source #

addVariable :: String -> P () Source #

isTypedef :: String -> P Bool Source #

isClassdef :: String -> P Bool Source #

data LexerException Source #

Constructors

LexerException (Maybe Pos) Doc 

Instances

Instances details
Exception LexerException Source # 
Instance details

Defined in Language.C.Parser.Monad

Show LexerException Source # 
Instance details

Defined in Language.C.Parser.Monad

Methods

showsPrec :: Int -> LexerException -> ShowS

show :: LexerException -> String

showList :: [LexerException] -> ShowS

data ParserException Source #

Constructors

ParserException Loc Doc 

Instances

Instances details
Exception ParserException Source # 
Instance details

Defined in Language.C.Parser.Monad

Show ParserException Source # 
Instance details

Defined in Language.C.Parser.Monad

Methods

showsPrec :: Int -> ParserException -> ShowS

show :: ParserException -> String

showList :: [ParserException] -> ShowS

failAt :: Loc -> String -> P a Source #

unclosed :: Loc -> String -> P a Source #

expected :: [String] -> Maybe String -> P b Source #

expectedAt :: L Token -> [String] -> Maybe String -> P b Source #

data AlexInput Source #

Constructors

AlexInput 

Fields

alexGetChar :: AlexInput -> Maybe (Char, AlexInput) Source #

alexGetByte :: AlexInput -> Maybe (Word8, AlexInput) Source #

nextChar :: P Char Source #

peekChar :: P Char Source #

maybePeekChar :: P (Maybe Char) Source #

type AlexPredicate = PState -> AlexInput -> Int -> AlexInput -> Bool Source #

The components of an AlexPredicate are the predicate state, input stream before the token, length of the token, input stream after the token.