Safe Haskell | None |
---|---|
Language | Haskell98 |
Documentation
newtype RealParser state s p a Source #
newtype RealAccept state result s p a Source #
newtype ParsRec state result s p a Source #
PR (RealParser state s p a, RealRecogn state s p, RealAccept state result s p a) |
mkPR :: OutputState result => (RealParser state s p a, RealRecogn state s p) -> ParsRec state result s p a Source #
unP :: RealParser state s p a -> (a -> r'' -> r') -> (state -> Steps r'' s p) -> state -> Steps r' s p Source #
parseRecbasic :: (inp -> Steps (out c d) sym pos) -> ParsRec inp out sym pos a -> inp -> Steps (out a (out c d)) sym pos Source #
parsebasic :: (inp -> Steps (out c d) sym pos) -> AnaParser inp out sym pos a -> inp -> Steps (out a (out c d)) sym pos Source #
libAccept :: (OutputState a, InputState b s p) => ParsRec b a s p s Source #
libInsert :: (OutputState result, InputState state s2 p, InputState state s1 p, InputState state s3 p) => Int# -> s1 -> Expecting s1 -> ParsRec state result s1 p s1 Source #
libSucceed :: OutputState result => a -> ParsRec state result s p a Source #
libSeq :: (OutputState result1, OutputState result2) => ParsRec state result3 s p (a1 -> a2) -> ParsRec state result2 s p a1 -> ParsRec state result1 s p a2 Source #
libDollar :: OutputState result1 => (a1 -> a2) -> ParsRec state result2 s p a1 -> ParsRec state result1 s p a2 Source #
libDollarL :: OutputState result1 => a1 -> ParsRec state result2 s p a2 -> ParsRec state result1 s p a1 Source #
libDollarR :: OutputState result1 => p1 -> ParsRec state result2 s p2 a -> ParsRec state result1 s p2 a Source #
libSeqL :: OutputState result1 => ParsRec state result2 s p a1 -> ParsRec state result3 s p a2 -> ParsRec state result1 s p a1 Source #
libSeqR :: OutputState result1 => ParsRec state result2 s p a1 -> ParsRec state result3 s p a2 -> ParsRec state result1 s p a2 Source #
libOr :: (OutputState result1, Ord s) => ParsRec state result2 s p a -> ParsRec state result3 s p a -> ParsRec state result1 s p a Source #
libFail :: OutputState a => ParsRec b a c p d Source #
hasSuccess :: Steps a s p -> Bool Source #
lib_correct :: Ord s => (b -> c -> Steps d s p) -> (b -> c -> Steps d s p) -> b -> c -> Steps d s p Source #
traverse :: ToBeat (Steps a s p) -> (Steps v s p -> Steps a s p, Steps v s p) -> Int# -> Int# -> ToBeat (Steps a s p) Source #
data AnaParser state result s p a Source #
Instances
(Ord s, Symbol s, InputState state s p, OutputState result, Applicative (AnaParser state result s p)) => Functor (AnaParser state result s p) # | |
(Ord s, Symbol s, InputState state s p, OutputState result) => Applicative (AnaParser state result s p) # | |
Defined in UU.Parsing.Interface pure :: a -> AnaParser state result s p a # (<*>) :: AnaParser state result s p (a -> b) -> AnaParser state result s p a -> AnaParser state result s p b # liftA2 :: (a -> b -> c) -> AnaParser state result s p a -> AnaParser state result s p b -> AnaParser state result s p c # (*>) :: AnaParser state result s p a -> AnaParser state result s p b -> AnaParser state result s p b # (<*) :: AnaParser state result s p a -> AnaParser state result s p b -> AnaParser state result s p a # | |
(Ord s, Symbol s, InputState state s p, OutputState result) => Alternative (AnaParser state result s p) # | |
Defined in UU.Parsing.Interface | |
(InputState inp s p, OutputState out) => StateParser (AnaParser (inp, st) out s p) st Source # | |
(Ord s, Symbol s, InputState state s p, OutputState result) => IsParser (AnaParser state result s p) s Source # | The fast |
Defined in UU.Parsing.Interface pSucceed :: a -> AnaParser state result s p a Source # pLow :: a -> AnaParser state result s p a Source # pFail :: AnaParser state result s p a Source # pCostRange :: Int# -> s -> SymbolR s -> AnaParser state result s p s Source # pCostSym :: Int# -> s -> s -> AnaParser state result s p s Source # pSym :: s -> AnaParser state result s p s Source # pRange :: s -> SymbolR s -> AnaParser state result s p s Source # getfirsts :: AnaParser state result s p v -> Expecting s Source # setfirsts :: Expecting s -> AnaParser state result s p v -> AnaParser state result s p v Source # getzerop :: AnaParser state result s p v -> Maybe (AnaParser state result s p v) Source # getonep :: AnaParser state result s p v -> Maybe (AnaParser state result s p v) Source # |
data TableEntry state result s p a Source #
TableEntry (ParsRec state result s p a) (Expecting s -> ParsRec state result s p a) |
anaFail :: OutputState a => AnaParser b a c p d Source #
noOneParser :: OneDescr state result s p a Source #
pEmpty :: ParsRec state result s p a -> (Bool, Either a (ParsRec state result s p a)) -> AnaParser state result s p a Source #
anaSucceed :: OutputState result => a -> AnaParser state result s p a Source #
anaLow :: OutputState result => a -> AnaParser state result s p a Source #
anaOr :: (InputState state s p, Symbol s, OutputState result, Ord s) => AnaParser state result s p a -> AnaParser state result s p a -> AnaParser state result s p a Source #
anaSeq :: (InputState state1 s p1, Symbol s, OutputState result1, Ord s, OutputState result2) => (a1 -> ParsRec state2 result2 s p2 a2 -> ParsRec state1 result1 s p1 a3) -> (ParsRec state3 result3 s p3 a1 -> ParsRec state2 result2 s p2 a2 -> ParsRec state1 result1 s p1 a3) -> (a1 -> a2 -> a3) -> AnaParser state3 result3 s p3 a1 -> AnaParser state2 result2 s p2 a2 -> AnaParser state1 result1 s p1 a3 Source #
seqZeroZero :: OutputState result => Maybe (Bool, Either t1 t2) -> Maybe (Bool, Either a1 (ParsRec state result s p a1)) -> (t1 -> ParsRec state result s p a1 -> b) -> (t2 -> ParsRec state result s p a1 -> b) -> (t1 -> a1 -> a2) -> Maybe (Bool, Either a2 b) Source #
orOneOneDescr :: Ord s => OneDescr state result s p a -> OneDescr state result s p a -> Bool -> OneDescr state result s p a Source #
anaCostRange :: (InputState b s p, OutputState a, Symbol s, Ord s) => Int# -> s -> SymbolR s -> AnaParser b a s p s Source #
anaGetFirsts :: AnaParser state result s p a -> Expecting s Source #
anaSetFirsts :: (InputState state s p, Symbol s, Ord s, OutputState result) => Expecting s -> AnaParser state result s p a -> AnaParser state result s p a Source #
mapOnePars :: (ParsRec state1 result1 s p1 a1 -> ParsRec state2 result2 s p2 a2) -> OneDescr state1 result1 s p1 a1 -> OneDescr state2 result2 s p2 a2 Source #
mkParser :: (InputState state s p, Symbol s, Ord s, OutputState result) => Nat -> Maybe (Bool, Either a (ParsRec state result s p a)) -> OneDescr state result s p a -> AnaParser state result s p a Source #
mergeTables :: (Ord a1, Symbol a1, OutputState result, Ord s) => [(SymbolR a1, ParsRec state result s p a2)] -> [(SymbolR a1, ParsRec state result s p a2)] -> [(SymbolR a1, ParsRec state result s p a2)] Source #
libMap :: OutputState result => (forall r r''. (b -> r -> r'') -> state -> Steps (a, r) s p -> (state, Steps r'' s p)) -> (forall r. state -> Steps r s p -> (state, Steps r s p)) -> ParsRec state result s p a -> ParsRec state result s p b Source #
pMap :: OutputState result => (forall r r''. (b -> r -> r'') -> state -> Steps (a, r) s p -> (state, Steps r'' s p)) -> (forall r. state -> Steps r s p -> (state, Steps r s p)) -> AnaParser state result s p a -> AnaParser state result s p b Source #
libWrap :: OutputState result => (forall r r''. (b -> r -> r'') -> state -> Steps (a, r) s p -> (state -> Steps r s p) -> (state, Steps r'' s p, state -> Steps r s p)) -> (forall r. state -> Steps r s p -> (state -> Steps r s p) -> (state, Steps r s p, state -> Steps r s p)) -> ParsRec state result s p a -> ParsRec state result s p b Source #
pWrap :: OutputState result => (forall r r''. (b -> r -> r'') -> state -> Steps (a, r) s p -> (state -> Steps r s p) -> (state, Steps r'' s p, state -> Steps r s p)) -> (forall r. state -> Steps r s p -> (state -> Steps r s p) -> (state, Steps r s p, state -> Steps r s p)) -> AnaParser state result s p a -> AnaParser state result s p b Source #