|
|
|
|
|
| Description |
| Utilities to turn a lexer generated by Alex into a scanner
that can be used by Yi.
|
|
| Synopsis |
|
| type AlexInput = (Char, IndexedStr) | | | alexGetChar :: AlexInput -> Maybe (Char, AlexInput) | | | alexInputPrevChar :: AlexInput -> Char | | | data AlexState lexerState = AlexState {} | | | unfoldLexer :: ((AlexState lexState, input) -> Maybe (token, (AlexState lexState, input))) -> (AlexState lexState, input) -> [(AlexState lexState, token)] | | | lexScanner :: forall lexerState token. ((AlexState lexerState, AlexInput) -> Maybe (token, (AlexState lexerState, AlexInput))) -> lexerState -> Scanner Point Char -> Scanner (AlexState lexerState) token | | | alexCollectChar :: AlexInput -> [Char] | | | actionConst :: token -> Action lexState token | | | actionAndModify :: (lexState -> lexState) -> token -> Action lexState token | | | actionStringAndModify :: (lexState -> lexState) -> (String -> token) -> Action lexState token | | | actionStringConst :: (String -> token) -> Action lexState token | | | data Tok t = Tok {} | | | tokBegin :: forall t. Tok t -> Point | | | tokEnd :: forall t. Tok t -> Point | | | tokFromT :: forall t. t -> Tok t | | | tokRegion :: Tok t -> Region | | | data Posn = Posn {} | | | startPosn :: Posn | | | moveStr :: Posn -> IndexedStr -> Posn | | | type ASI s = (AlexState s, AlexInput) | | | (+~) :: SemiNum absolute relative => absolute -> relative -> absolute | | | (~-) :: SemiNum absolute relative => absolute -> absolute -> relative | | | newtype Size = Size {} | | | type Stroke = Span StyleName | | | tokToSpan :: Tok t -> Span t |
|
|
|
| Names expected by Alex code
|
|
|
|
|
|
|
|
| Other things closely associated with the lexer
|
|
| data AlexState lexerState | Source |
|
| Lexer state
| | Constructors | | AlexState | | | stLexer :: lexerState | | | lookedOffset :: !Point | | | stPosn :: !Posn | |
|
| Instances | |
|
|
|
| unfold lexer function into a function that returns a stream of (state x token)
|
|
|
|
|
|
|
| Lexer actions
|
|
| actionConst :: token -> Action lexState token | Source |
|
| Return a constant token
|
|
| actionAndModify :: (lexState -> lexState) -> token -> Action lexState token | Source |
|
| Return a constant token, and modify the lexer state
|
|
| actionStringAndModify :: (lexState -> lexState) -> (String -> token) -> Action lexState token | Source |
|
| Convert the parsed string into a token,
and also modify the lexer state
|
|
| actionStringConst :: (String -> token) -> Action lexState token | Source |
|
| Convert the parsed string into a token
|
|
| Data produced by the scanner
|
|
|
| Constructors | | Instances | |
|
|
|
|
|
|
|
|
|
|
|
| Constructors | | Instances | |
|
|
|
|
|
|
|
|
| (+~) :: SemiNum absolute relative => absolute -> relative -> absolute | Source |
|
|
| (~-) :: SemiNum absolute relative => absolute -> absolute -> relative | Source |
|
|
|
| Size of a buffer region
| | Constructors | | Instances | |
|
|
|
|
|
|
| Produced by Haddock version 2.6.1 |