View Source Cogito.Combinators (Cogito v1.0.0)
A list of basic combinators.
The meaning of each combinator is derived from the names:
identity
char
map
concat
either
star
plus
seq
fseq
nth
repeat
choice
optional
join
ignore
eos
lazy
Summary
Functions
@spec char((integer() -> true | false) | integer()) :: Cogito.parser()
@spec choice([Cogito.parser()]) :: Cogito.parser()
@spec concat(Cogito.parser(), Cogito.parser(), (any(), any() -> any())) :: Cogito.parser()
@spec either(Cogito.parser(), Cogito.parser()) :: Cogito.parser()
@spec eos(Cogito.parser()) :: (String.t() -> {:ok, any()} | {:err, any()})
@spec eos!(Cogito.parser()) :: Cogito.parser!()
@spec fseq([Cogito.parser()], (any() -> any())) :: Cogito.parser()
@spec identity(any()) :: Cogito.parser()
@spec ignore(Cogito.parser()) :: Cogito.parser()
@spec join(Cogito.parser()) :: Cogito.parser()
@spec map(Cogito.parser(), (any() -> any())) :: Cogito.parser()
@spec nth([Cogito.parser()], integer()) :: Cogito.parser()
@spec optional(Cogito.parser()) :: Cogito.parser()
@spec plus(Cogito.parser()) :: Cogito.parser()
@spec repeat(Cogito.parser(), integer()) :: Cogito.parser()
@spec seq([Cogito.parser()]) :: Cogito.parser()
@spec star(Cogito.parser()) :: Cogito.parser()