- class InputState state s pos | state -> s, state -> pos where
- class OutputState r where
- class Symbol s where
- data Either' state s
- data Steps val s p
- data Action s
- val :: (a -> b) -> Steps a s p -> Steps b s p
- evalSteps :: Steps a s p -> a
- getMsgs :: Steps a s p -> [Message s p]
- data Message sym pos = Msg (Expecting sym) !pos (Action sym)
- data Expecting s
- data SymbolR s
- mk_range :: Ord s => s -> s -> SymbolR s
- symInRange :: Ord a => SymbolR a -> a -> Bool
- symRS :: Ord a => SymbolR a -> a -> Ordering
- except :: (Ord a, Symbol a) => SymbolR a -> [a] -> [SymbolR a]
- usererror :: [Char] -> t
- systemerror :: [Char] -> [Char] -> t
Splits the state in the first symbol and the remaining state
Gets the current position in the input
Reports an error
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.
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.