Copyright | (c) Harvard University 2006-2011 (c) Geoffrey Mainland 2011-2013 |
---|---|
License | BSD-style |
Maintainer | mainland@cs.drexel.edu |
Safe Haskell | None |
Language | Haskell98 |
- data P a
- runP :: P a -> PState -> Either SomeException (a, PState)
- evalP :: P a -> PState -> Either SomeException a
- data PState
- emptyPState :: [Extensions] -> [String] -> ByteString -> Pos -> PState
- getInput :: P AlexInput
- setInput :: AlexInput -> P ()
- pushLexState :: Int -> P ()
- popLexState :: P Int
- getLexState :: P Int
- pushbackToken :: L Token -> P ()
- getPushbackToken :: P (Maybe (L Token))
- getCurToken :: P (L Token)
- setCurToken :: L Token -> P ()
- addTypedef :: String -> P ()
- addClassdef :: String -> P ()
- addVariable :: String -> P ()
- isTypedef :: String -> P Bool
- isClassdef :: String -> P Bool
- pushScope :: P ()
- popScope :: P ()
- c99Exts :: ExtensionsInt
- c11Exts :: ExtensionsInt
- gccExts :: ExtensionsInt
- blocksExts :: ExtensionsInt
- cudaExts :: ExtensionsInt
- openCLExts :: ExtensionsInt
- objcExts :: ExtensionsInt
- useExts :: ExtensionsInt -> P Bool
- antiquotationExts :: ExtensionsInt
- useC99Exts :: P Bool
- useC11Exts :: P Bool
- useGccExts :: P Bool
- useBlocksExts :: P Bool
- useCUDAExts :: P Bool
- useOpenCLExts :: P Bool
- useObjCExts :: P Bool
- data LexerException = LexerException Pos Doc
- data ParserException = ParserException Loc Doc
- quoteTok :: Doc -> Doc
- failAt :: Loc -> String -> P a
- lexerError :: AlexInput -> Doc -> P a
- unexpectedEOF :: AlexInput -> P a
- emptyCharacterLiteral :: AlexInput -> P a
- illegalCharacterLiteral :: AlexInput -> P a
- illegalNumericalLiteral :: AlexInput -> P a
- parserError :: Loc -> Doc -> P a
- unclosed :: Loc -> String -> P a
- expected :: [String] -> Maybe String -> P b
- expectedAt :: L Token -> [String] -> Maybe String -> P b
- data AlexInput = AlexInput {
- alexPos :: !Pos
- alexPrevChar :: !Char
- alexInput :: !ByteString
- alexOff :: !Int
- alexGetChar :: AlexInput -> Maybe (Char, AlexInput)
- alexGetByte :: AlexInput -> Maybe (Word8, AlexInput)
- alexInputPrevChar :: AlexInput -> Char
- nextChar :: P Char
- peekChar :: P Char
- maybePeekChar :: P (Maybe Char)
- skipChar :: P ()
- type AlexPredicate = PState -> AlexInput -> Int -> AlexInput -> Bool
- allowAnti :: AlexPredicate
- ifExtension :: ExtensionsInt -> AlexPredicate
Documentation
emptyPState :: [Extensions] -> [String] -> ByteString -> Pos -> PState Source
pushLexState :: Int -> P () Source
popLexState :: P Int Source
getLexState :: P Int Source
pushbackToken :: L Token -> P () Source
getCurToken :: P (L Token) Source
setCurToken :: L Token -> P () Source
addTypedef :: String -> P () Source
addClassdef :: String -> P () Source
addVariable :: String -> P () Source
isClassdef :: String -> P Bool Source
useExts :: ExtensionsInt -> P Bool Source
useC99Exts :: P Bool Source
useC11Exts :: P Bool Source
useGccExts :: P Bool Source
useBlocksExts :: P Bool Source
useCUDAExts :: P Bool Source
useOpenCLExts :: P Bool Source
useObjCExts :: P Bool Source
data LexerException Source
data ParserException Source
lexerError :: AlexInput -> Doc -> P a Source
unexpectedEOF :: AlexInput -> P a Source
emptyCharacterLiteral :: AlexInput -> P a Source
illegalCharacterLiteral :: AlexInput -> P a Source
illegalNumericalLiteral :: AlexInput -> P a Source
parserError :: Loc -> Doc -> P a Source
AlexInput | |
|
alexInputPrevChar :: AlexInput -> 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.