sutori-0.2.4: Sutori language compiler

Safe HaskellSafe
LanguageHaskell2010

Sutori.Lexer.Internals

Description

 

Synopsis

Documentation

utf8Encode :: Char -> [Word8] Source #

Encode a Haskell String to a list of Word8 values, in UTF8 format. Taken from Alex wrapper templates

type SutoriInput = (SutPosn, Char, [Word8], String) Source #

The type of the scanner's food (Current position, Previous character, pending bytes on current character, current input)

type AlexInput = SutoriInput Source #

Alias needed by Alex

alexInputPrevChar :: SutoriInput -> Char Source #

Needed by alex for look-back. We don't use look-back now

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

Needed by alex to read

ignorePendingBytes :: SutoriInput -> SutoriInput Source #

Ignore the current character's pending bytes

sutTabSize :: Int Source #

Hard-coded tab size for positioning

lexerMove :: SutPosn -> Char -> SutPosn Source #

Move the scanner position given a character

lexerSetInput :: SutoriInput -> SutMonad () Source #

Set remaining input