Safe Haskell | Safe-Inferred |
---|---|
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 RealAccept state result s p a Source #
newtype ParsRec state result 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 :: (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 {result :: Type -> Type -> Type} {result :: Type -> Type -> Type} {state} {result :: Type -> Type -> Type} {s} {p} {b} {a}. (OutputState result, OutputState result) => ParsRec state result s p (b -> a) -> ParsRec state result s p b -> ParsRec state result s p a Source #
libDollar :: forall {result :: Type -> Type -> Type} {a} {a} {state} {result :: Type -> Type -> Type} {s} {p}. OutputState result => (a -> a) -> ParsRec state result s p a -> ParsRec state result s p a Source #
libDollarL :: forall {result :: Type -> Type -> Type} {a} {state} {result :: Type -> Type -> Type} {s} {p} {a}. OutputState result => a -> ParsRec state result s p a -> ParsRec state result s p a Source #
libDollarR :: forall {result :: Type -> Type -> Type} {p} {state} {result :: Type -> Type -> Type} {s} {p} {a}. OutputState result => p -> ParsRec state result s p a -> ParsRec state result s p a Source #
libSeqL :: forall {result :: Type -> Type -> Type} {state} {result :: Type -> Type -> Type} {s} {p} {a} {result :: Type -> Type -> Type} {a}. OutputState result => ParsRec state result s p a -> ParsRec state result s p a -> ParsRec state result s p a Source #
libSeqR :: forall {result :: Type -> Type -> Type} {state} {result :: Type -> Type -> Type} {s} {p} {a} {result :: Type -> Type -> Type} {a}. OutputState result => ParsRec state result s p a -> ParsRec state result s p a -> ParsRec state result s p a Source #
libOr :: forall {result :: Type -> Type -> Type} {s} {state} {result :: Type -> Type -> Type} {p} {a} {result :: Type -> Type -> Type}. (OutputState result, Ord s) => ParsRec state result s p a -> ParsRec state result s p a -> ParsRec state result 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 #
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 s p a Source #
Constructors
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 :: 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 {state} {s} {p} {result :: Type -> Type -> Type} {result :: Type -> Type -> Type} {a} {state} {p} {a} {a} {state} {result :: Type -> Type -> Type} {p}. (InputState state s p, Symbol s, Ord s, OutputState result, OutputState result) => (a -> ParsRec state result s p a -> ParsRec state result s p a) -> (ParsRec state result s p a -> ParsRec state result s p a -> ParsRec state result s p a) -> (a -> a -> a) -> AnaParser state result s p a -> AnaParser state result s p a -> AnaParser state result s p a Source #
seqZeroZero :: forall {result :: Type -> Type -> Type} {t} {t} {a} {state} {s} {p} {b} {a}. OutputState result => Maybe (Bool, Either t t) -> Maybe (Bool, Either a (ParsRec state result s p a)) -> (t -> ParsRec state result s p a -> b) -> (t -> ParsRec state result s p a -> b) -> (t -> a -> a) -> Maybe (Bool, Either a 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 {state} {result :: Type -> Type -> Type} {s} {p} {a} {state} {result :: Type -> Type -> Type} {p} {a}. (ParsRec state result s p a -> ParsRec state result s p a) -> OneDescr state result s p a -> OneDescr state result s p a 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 :: forall {a} {result :: Type -> Type -> Type} {s} {state} {p} {a}. (Symbol a, OutputState result, Ord a, Ord s) => [(SymbolR a, ParsRec state result s p a)] -> [(SymbolR a, ParsRec state result s p a)] -> [(SymbolR a, ParsRec state result s p a)] 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 #