Safe Haskell | None |
---|---|
Language | Haskell2010 |
- lexerScanClean :: SutMonad SutToken
- runLexer :: Options -> String -> SutMonad a -> Either (SutError, SutLog) ((a, SutState), SutLogger)
- runLexer' :: String -> SutMonad a -> Either (SutError, SutLog) ((a, SutState), SutLogger)
- runLexerScan :: Options -> String -> Either (SutError, SutLog) (([SutToken], SutState), SutLogger)
- lexwrap :: (SutToken -> SutMonad a) -> SutMonad a
- data SutToken
- = SutTkEOF
- | BLOCK_OPEN
- | BLOCK_CLOSE
- | PROGRAM_INI
- | PROGRAM_FIN
- | FUNCTION_INI
- | FUNCTION_DECLARE
- | FUNCTION_DEFINE
- | S_andthatswhere
- | S_therewas
- | S_brokea
- | S_broughta
- | S_comesfrom
- | S_dreamsof
- | S_keepsdreamingof
- | S_madea
- | S_madeof
- | S_therewasa
- | S_toldthatstory
- | S_invented
- | S_itsa
- | S_andnothingelse
- | S_wewillskipthis
- | TYPE_INT
- | TYPE_FLOAT
- | TYPE_CHAR
- | TYPE_VOID
- | TYPE_BOOL
- | TYPE_ARRAY
- | TYPE_STRUCT
- | TYPE_UNION
- | TYPE_STRING
- | TYPE_POINTER
- | OPEN_PAREN
- | OPEN_BRACKETS
- | OPEN_BRACES
- | CLOSE_PAREN
- | CLOSE_BRACKETS
- | CLOSE_BRACES
- | ELLIPSIS
- | PERIOD
- | COMMA
- | COLON
- | SEMICOLON
- | QUESTIONMARK
- | EXCLAMATION
- | ARROW_RIGHT
- | PLUS
- | MINUS
- | EQUAL
- | ASSIGNMENT
- | ASTERISK
- | PERCENT
- | SLASH
- | DIV
- | NOT_EQUAL
- | GREATER_EQUAL
- | LESS_EQUAL
- | GREATER
- | LESS
- | POWER
- | AND
- | OR
- | WITH
- | YOUR
- | OF
- | EITHER
- | TO
- | WHEN
- | OTHERWISE
- | TIMES
- | SutTkBool { }
- | SutTkChar { }
- | SutTkFloat {
- tokenFloat :: Float
- | SutTkInt { }
- | SutTkString { }
- | SutTkError {
- tokenError :: String
- | SutTkID { }
- initialPosn :: SutPosn
- data SutPosn
- lexerLoop :: SutMonad [SutToken]
Documentation
lexerScanClean :: SutMonad SutToken Source #
Scans for next token, but passes it though checks first
runLexer :: Options -> String -> SutMonad a -> Either (SutError, SutLog) ((a, SutState), SutLogger) Source #
Run the lexer on a given input string, with a given monadic action
runLexer' :: String -> SutMonad a -> Either (SutError, SutLog) ((a, SutState), SutLogger) Source #
Run the lexer with no options (default options)
runLexerScan :: Options -> String -> Either (SutError, SutLog) (([SutToken], SutState), SutLogger) Source #
Run the lexer on a given string, get the resulting tokens
lexwrap :: (SutToken -> SutMonad a) -> SutMonad a Source #
Run the lexer, but receive a continuation (Used by Happy)
Sutori token classes. Their RegEx' are defined in Alex file
initialPosn :: SutPosn Source #
Initial position of the scanner
Source position (Characters before, Row number, Column number)