Copyright | (c) Eric Mertens 2023 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
This module provides a custom engine for the Alex generated lexer. This lexer drive provides nested states, unicode support, and file location tracking.
Synopsis
- type M a = State [Context] a
- type Action = String -> M Token
- data Context
- value :: (String -> Token) -> Action
- value_ :: Token -> Action
- token :: (String -> Token) -> Action
- token_ :: Token -> Action
- enterList :: Action
- exitList :: Action
- enterTable :: Action
- exitTable :: Action
- equals :: Action
- timeValue :: ParseTime a => String -> [String] -> (a -> Token) -> Action
- type AlexInput = Located String
- alexGetByte :: AlexInput -> Maybe (Int, AlexInput)
Types
ListContext | processing an inline list, lex values |
TableContext | processing an inline table, don't lex values |
ValueContext | processing after an equals, lex one value |
Actions
enterTable :: Action Source #