Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Utility definitions used by the lexer. None of the default Alex "wrappers" are precisely what we need. The code here is highly minimalistic. Lexers should not be complicated!
Synopsis
- initialLexerState :: Pos -> ByteString -> AlexInput
- type AlexInput = (Pos, Char, ByteString, Int64)
- alexInputPrevChar :: AlexInput -> Char
- data LexerError = LexerError Loc Text
- alexGetByte :: AlexInput -> Maybe (Byte, AlexInput)
- alexGetPos :: AlexInput -> Pos
Documentation
initialLexerState :: Pos -> ByteString -> AlexInput Source #
type AlexInput = (Pos, Char, ByteString, Int64) Source #
The input type. Contains:
- current position
- previous char
- current input string
- bytes consumed so far
alexInputPrevChar :: AlexInput -> Char Source #
data LexerError Source #
Instances
Show LexerError Source # | |
Defined in Language.Futhark.Parser.Lexer.Wrapper showsPrec :: Int -> LexerError -> ShowS # show :: LexerError -> String # showList :: [LexerError] -> ShowS # |
alexGetPos :: AlexInput -> Pos Source #