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
- 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
- cudaExts :: ExtensionsInt
- openCLExts :: ExtensionsInt
- objcExts :: ExtensionsInt
- useExts :: ExtensionsInt -> P Bool
- antiquotationExts :: ExtensionsInt
- useC99Exts :: P Bool
- useC11Exts :: P Bool
- useGccExts :: 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
data P a
evalP :: P a -> PState -> Either SomeException a
data PState
emptyPState :: [Extensions] -> [String] -> ByteString -> Pos -> PState
pushLexState :: Int -> P ()
popLexState :: P Int
getLexState :: P Int
getCurToken :: P (L Token)
setCurToken :: L Token -> P ()
addTypedef :: String -> P ()
addClassdef :: String -> P ()
addVariable :: String -> P ()
isClassdef :: String -> P Bool
useExts :: ExtensionsInt -> P Bool
useC99Exts :: P Bool
useC11Exts :: P Bool
useGccExts :: P Bool
useCUDAExts :: P Bool
useOpenCLExts :: P Bool
useObjCExts :: P Bool
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
data AlexInput
AlexInput | |
|
alexGetChar :: AlexInput -> Maybe (Char, AlexInput)
alexGetByte :: AlexInput -> Maybe (Word8, AlexInput)
alexInputPrevChar :: AlexInput -> Char
maybePeekChar :: P (Maybe Char)
type AlexPredicate = PState -> AlexInput -> Int -> AlexInput -> Bool
The components of an AlexPredicate
are the predicate state, input stream
before the token, length of the token, input stream after the token.