|
UU.Parsing.MachineInterface |
|
|
|
Synopsis |
|
|
|
Documentation |
|
class InputState state s pos | state -> s, state -> pos where | Source |
|
The InputState class contains the interface that the AnaParser
parsers expect for the input. A minimal complete instance definition
consists of splitStateE, splitState and getPosition.
| | Methods | | Splits the state in a strict variant of Either, with Left' if a symbol
can be split off and Right' if none can
| | splitState :: state -> (#s, state#) | Source |
| Splits the state in the first symbol and the remaining state
| | getPosition :: state -> pos | Source |
| Gets the current position in the input
| | | Reports an error
| | insertSymbol :: s -> state -> state | Source |
| Modify the state as the result of inserting a symbol s in the input.
The symbol that has already been considered as having been inserted
is passed. It should normally not be added to the state.
| | deleteSymbol :: s -> state -> state | Source |
| Modify the state as the result of deleting a symbol s from the input.
The symbol that has already been deleted from the input state is passed.
It should normally not be deleted from the state.
|
|
|
|
class OutputState r where | Source |
|
| Methods | acceptR :: v -> rest -> r v rest | Source |
| | nextR :: (a -> rest -> rest') -> (b -> a) -> r b rest -> rest' | Source |
|
|
|
|
|
|
|
|
Constructors | Left' !s state | | Right' state | |
|
|
|
|
Constructors | forall a . OkVal (a -> val) (Steps a s p) | | Ok | | | Cost | | | StRepair | | | Best (Steps val s p) (Steps val s p) (Steps val s p) | | NoMoreSteps val | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Produced by Haddock version 2.6.0 |