View Source Minipeg.Parsers.BasicParsers (Minipeg v0.7.1)
Basic parsers which would be sufficient to write any parser but are of course completed by many more convenience parsers
Summary
Functions
Parser that only succeeds on empty input / end of input
Parses any char with the exception of chars in the forbidden
set
This parser always succeeds. N.B. It does not advance the input
Types
@type ast_list_t() :: [ast_t()]
@type ast_t() :: any()
@type atoms() :: [atom()]
@type binaries() :: [binary()]
@type either(success_t, error_t) :: {:ok, success_t} | {:error, error_t}
@type input_t() :: binary() | [binary()] | Minipeg.Input.t()
@type maybe(t) :: nil | t
@type parser_function_t() :: (Minipeg.Input.t(), Minipeg.Cache.t(), binary() -> result_t())
@type position_t() :: {pos_integer(), pos_integer()}
@type result_t() :: Minipeg.Failure.t() | Minipeg.Ignore.t() | Minipeg.Success.t()
@type satisfier_t() :: (any() -> satisfier_result_t())
@type str_or_count_t() :: binary() | non_neg_integer()
@type token_comp_t() :: [token1_comp_t()]
@type token_spec_t() :: [token1_spec_t()]
Functions
@spec end_parser(binary?()) :: Minipeg.Parser.t()
Parser that only succeeds on empty input / end of input
@spec failure_parser(binary?(), binary?()) :: Minipeg.Parser.t()
@spec not_char_parser(char_set_t(), binary?()) :: Minipeg.Parser.t()
Parses any char with the exception of chars in the forbidden
set
@spec success_parser(ast_t(), binary?()) :: Minipeg.Parser.t()
This parser always succeeds. N.B. It does not advance the input