| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
UU.Parsing.Machine
Documentation
pDynE :: forall {state} {result :: Type -> Type -> Type} {s} {p} {a}. ParsRec state result s p a -> AnaParser state result s p a Source #
pDynL :: forall {state} {result :: Type -> Type -> Type} {s} {p} {a}. ParsRec state result s p a -> AnaParser state result s p a Source #
newtype RealParser state s p a Source #
newtype RealRecogn state s p Source #
newtype ParsRec state (result :: Type -> Type -> Type) s p a Source #
Constructors
| PR (RealParser state s p a, RealRecogn state s p, RealAccept state result s p a) |
mkPR :: forall {result :: Type -> Type -> Type} {state} {s} {p} {a}. 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 :: forall (a :: Type -> Type -> Type) b s p. (OutputState a, InputState b s p) => ParsRec b a s p s Source #
libInsert :: forall {result :: Type -> Type -> Type} {state} {a} {p}. (OutputState result, InputState state a p) => Int# -> a -> Expecting a -> ParsRec state result a p a Source #
libSucceed :: forall {result :: Type -> Type -> Type} {a} {state} {s} {p}. OutputState result => a -> ParsRec state result s p a Source #
libSeq :: forall {result1 :: Type -> Type -> Type} {result2 :: Type -> Type -> Type} {state} {result3 :: Type -> Type -> Type} {s} {p} {b} {a}. (OutputState result1, OutputState result2) => ParsRec state result3 s p (b -> a) -> ParsRec state result2 s p b -> ParsRec state result1 s p a Source #
libDollar :: forall {result1 :: Type -> Type -> Type} {a1} {a2} {state} {result2 :: Type -> Type -> Type} {s} {p}. OutputState result1 => (a1 -> a2) -> ParsRec state result2 s p a1 -> ParsRec state result1 s p a2 Source #
libDollarL :: forall {result1 :: Type -> Type -> Type} {a1} {state} {result2 :: Type -> Type -> Type} {s} {p} {a2}. OutputState result1 => a1 -> ParsRec state result2 s p a2 -> ParsRec state result1 s p a1 Source #
libDollarR :: forall {result1 :: Type -> Type -> Type} {p1} {state} {result2 :: Type -> Type -> Type} {s} {p2} {a}. OutputState result1 => p1 -> ParsRec state result2 s p2 a -> ParsRec state result1 s p2 a Source #
libSeqL :: forall {result1 :: Type -> Type -> Type} {state} {result2 :: Type -> Type -> Type} {s} {p} {a1} {result3 :: Type -> Type -> Type} {a2}. OutputState result1 => ParsRec state result2 s p a1 -> ParsRec state result3 s p a2 -> ParsRec state result1 s p a1 Source #
libSeqR :: forall {result1 :: Type -> Type -> Type} {state} {result2 :: Type -> Type -> Type} {s} {p} {a1} {result3 :: Type -> Type -> Type} {a2}. OutputState result1 => ParsRec state result2 s p a1 -> ParsRec state result3 s p a2 -> ParsRec state result1 s p a2 Source #
libOr :: forall {result1 :: Type -> Type -> Type} {s} {state} {result2 :: Type -> Type -> Type} {p} {a} {result3 :: Type -> Type -> Type}. (OutputState result1, Ord s) => ParsRec state result2 s p a -> ParsRec state result3 s p a -> ParsRec state result1 s p a 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 :: Type -> Type -> Type) s p a Source #
Constructors
| AnaParser | |
Instances
| (Ord s, Symbol s, InputState state s p, OutputState result) => Alternative (AnaParser state result s p) Source # | |
Defined in UU.Parsing.Interface Methods empty :: AnaParser state result s p a Source # (<|>) :: AnaParser state result s p a -> AnaParser state result s p a -> AnaParser state result s p a Source # some :: AnaParser state result s p a -> AnaParser state result s p [a] Source # many :: AnaParser state result s p a -> AnaParser state result s p [a] Source # | |
| (Ord s, Symbol s, InputState state s p, OutputState result) => Applicative (AnaParser state result s p) Source # | |
Defined in UU.Parsing.Interface Methods pure :: a -> AnaParser state result s p a Source # (<*>) :: AnaParser state result s p (a -> b) -> AnaParser state result s p a -> AnaParser state result s p b Source # liftA2 :: (a -> b -> c) -> AnaParser state result s p a -> AnaParser state result s p b -> AnaParser state result s p c Source # (*>) :: AnaParser state result s p a -> AnaParser state result s p b -> AnaParser state result s p b Source # (<*) :: AnaParser state result s p a -> AnaParser state result s p b -> AnaParser state result s p a Source # | |
| (Ord s, Symbol s, InputState state s p, OutputState result) => Functor (AnaParser state result s p) 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 Methods 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 # | |
| (InputState inp s p, OutputState out) => StateParser (AnaParser (inp, st) out s p) st Source # | |
data TableEntry state (result :: Type -> Type -> Type) s p a Source #
Constructors
| TableEntry (ParsRec state result s p a) (Expecting s -> ParsRec state result s p a) |
anaFail :: forall (a :: Type -> Type -> Type) b c p d. OutputState a => AnaParser b a c p d Source #
noOneParser :: forall {state} {result :: Type -> Type -> Type} {s} {p} {a}. OneDescr state result s p a Source #
pEmpty :: forall {state} {result :: Type -> Type -> Type} {s} {p} {a}. ParsRec state result s p a -> (Bool, Either a (ParsRec state result s p a)) -> AnaParser state result s p a Source #
anaSucceed :: forall {result :: Type -> Type -> Type} {a} {state} {s} {p}. OutputState result => a -> AnaParser state result s p a Source #
anaLow :: forall {result :: Type -> Type -> Type} {a} {state} {s} {p}. OutputState result => a -> AnaParser state result s p a Source #
anaDynE :: forall {state} {result :: Type -> Type -> Type} {s} {p} {a}. ParsRec state result s p a -> AnaParser state result s p a Source #
anaDynL :: forall {state} {result :: Type -> Type -> Type} {s} {p} {a}. ParsRec state result s p a -> AnaParser state result s p a Source #
anaOr :: forall {state} {s} {p} {result :: Type -> Type -> Type} {a}. (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 :: forall {state1} {s} {p1} {result1 :: Type -> Type -> Type} {result2 :: Type -> Type -> Type} {a1} {state2} {p2} {a2} {a3} {state3} {result3 :: Type -> Type -> Type} {p3}. (InputState state1 s p1, Symbol s, Ord s, OutputState result1, 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 :: forall {result :: Type -> Type -> Type} {t1} {t2} {a1} {state} {s} {p} {b} {a2}. 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 :: forall {s} {state} {result :: Type -> Type -> Type} {p} {a}. Ord s => OneDescr state result s p a -> OneDescr state result s p a -> Bool -> OneDescr state result s p a Source #
anaCostRange :: forall {a :: Type -> Type -> Type} {b} {d} {p}. (OutputState a, InputState b d p, Symbol d, Ord d) => Int# -> d -> SymbolR d -> AnaParser b a d p d Source #
anaGetFirsts :: forall {state} {result :: Type -> Type -> Type} {s} {p} {a}. AnaParser state result s p a -> Expecting s Source #
anaSetFirsts :: forall {state} {s} {p} {result :: Type -> Type -> Type} {a}. (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 :: forall {state1} {result1 :: Type -> Type -> Type} {s} {p1} {a1} {state2} {result2 :: Type -> Type -> Type} {p2} {a2}. (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 :: forall state s p (result :: Type -> Type -> Type) a. (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 :: forall {a1} {result :: Type -> Type -> Type} {s} {state} {p} {a2}. (Symbol a1, OutputState result, Ord a1, 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 :: forall (result :: Type -> Type -> Type) b state a s p. 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 :: forall (result :: Type -> Type -> Type) b state a s p. 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 :: forall (result :: Type -> Type -> Type) b state a s p. 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 :: forall (result :: Type -> Type -> Type) b state a s p. 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 #