RuleParser v0.3.0 RuleParser.Helper View Source

Helper functions for making parser work easy

Link to this section Summary

Functions

Ignore bracket and the inner space

Ignore both lowercase name and uppercase name for keyword

Ignore predefined prefixes

Ignore separator

Ignore white space and tab, and make it optional

Match an atom with space

Match integer

Match a list of predefined ops

Match string with quote, and inner quote, e.g. ~S("this is "hello world"")

We fixed the 1st char must be a-z, so for opts if min/max is given, please consider to shift with 1

parse white space or tab

Link to this section Functions

Link to this function

ignore_bracket(left, combinator, right) View Source
ignore_bracket(char(), NimbleParsec.t(), char()) :: NimbleParsec.t()

Ignore bracket and the inner space

Link to this function

ignore_keyword(name) View Source
ignore_keyword(binary()) :: NimbleParsec.t()

Ignore both lowercase name and uppercase name for keyword

Link to this function

ignore_prefix(names) View Source
ignore_prefix([binary()]) :: NimbleParsec.t()

Ignore predefined prefixes

Ignore separator

Link to this function

ignore_space() View Source
ignore_space() :: NimbleParsec.t()

Ignore white space and tab, and make it optional

Match an atom with space

Link to this function

parse_integer() View Source
parse_integer() :: NimbleParsec.t()

Match integer

Match a list of predefined ops

Link to this function

parse_string(quote_char \\ 34) View Source
parse_string(char()) :: NimbleParsec.t()

Match string with quote, and inner quote, e.g. ~S("this is "hello world"")

Link to this function

parse_tag(range \\ [97..122, 95]) View Source
parse_tag(list()) :: NimbleParsec.t()

We fixed the 1st char must be a-z, so for opts if min/max is given, please consider to shift with 1.

parse white space or tab

Link to this function

parser_result_not_quote(arg1, context, _, _, char) View Source

Link to this function

parser_result_to_atom(list) View Source

Link to this function

parser_result_to_string(v) View Source