zeolite-lang-0.24.0.0: example/parser/parse-text.0rp
// Parses a fixed string.
concrete StringParser {
@type create (String) -> (Parser<String>)
}
// Parses a string containing a limited set of characters.
concrete SequenceOfParser {
@type create (String, Int min:, Int max:) -> (Parser<String>)
}
// Parses a fixed character.
concrete CharParser {
@type create (Char) -> (Parser<Char>)
}
// Parser combinators.
concrete Parse {
@type const<#x>
#x immutable
(#x) -> (Parser<#x>)
@type error (Formatted) -> (Parser<all>)
@type try<#x> (Parser<#x>) -> (Parser<#x>)
@type or<#x> (Parser<#x>, Parser<#x>) -> (Parser<#x>)
@type left<#x> (Parser<#x>, Parser<any>) -> (Parser<#x>)
@type right<#x> (Parser<any>, Parser<#x>) -> (Parser<#x>)
}