- data LookAhead a
- runLookAhead :: (forall b. String -> LookAhead b) -> LookAhead a -> Parser a
- getInput :: LookAhead AlexInput
- setInput :: AlexInput -> LookAhead ()
- liftP :: Parser a -> LookAhead a
- nextChar :: LookAhead Char
- eatNextChar :: LookAhead Char
- sync :: LookAhead ()
- rollback :: LookAhead ()
- match :: [(String, LookAhead a)] -> LookAhead a -> LookAhead a
- match' :: Char -> [(String, LookAhead a)] -> LookAhead a -> LookAhead a

# The LookAhead monad

runLookAhead :: (forall b. String -> LookAhead b) -> LookAhead a -> Parser aSource

Run a `LookAhead`

computation. The first argument is the error function.

# Operations

rollback :: LookAhead ()Source

Undo look-ahead. Restores the input from the `ParseState`

.

match :: [(String, LookAhead a)] -> LookAhead a -> LookAhead aSource

Do a case on the current input string. If any of the given strings match we move past it and execute the corresponding action. If no string matches, we execute a default action, advancing the input one character. This function only affects the look-ahead position.