Parselix.Basic

Provide basic parsers.

Source

Summary

any(option \\ nil)

Parse any character

any_l(option \\ nil)

This is almost the same function as any/1, but it returns a result with metadata

char(option \\ nil)

Parse a specified character

char_l(option \\ nil)

This is almost the same function as char/1, but it returns a result with metadata

check(option \\ nil)

Validate the parser result

check_l(option \\ nil)

This is almost the same function as check/1, but it returns a result with metadata

choice(option \\ nil)

Return a result of parser which succeeds first

choice_l(option \\ nil)

This is almost the same function as choice/1, but it returns a result with metadata

clean(option \\ nil)

Remove :empty from the parser result

clean_l(option \\ nil)

This is almost the same function as clean/1, but it returns a result with metadata

compress(option \\ nil)

Compress the parser result to a string

compress_l(option \\ nil)

This is almost the same function as compress/1, but it returns a result with metadata

concat(option \\ nil)

Flatten the parser result once

concat_l(option \\ nil)

This is almost the same function as concat/1, but it returns a result with metadata

default(option \\ nil)

Return a default value when parser failed

default_l(option \\ nil)

This is almost the same function as default/1, but it returns a result with metadata

dump(option \\ nil)

Dump the parser result

dump_l(option \\ nil)

This is almost the same function as dump/1, but it returns a result with metadata

eof(option \\ nil)

Parse the end of text

eof_l(option \\ nil)

This is almost the same function as eof/1, but it returns a result with metadata

flat(option \\ nil)

Flatten the parser result

flat_l(option \\ nil)

This is almost the same function as flat/1, but it returns a result with metadata

ignore(option \\ nil)

Ignore the parser result

ignore_l(option \\ nil)

This is almost the same function as ignore/1, but it returns a result with metadata

many(option \\ nil)

Parse 0 or more times

many_1(option \\ nil)

Parse 1 or more times

many_1_c(option \\ nil)

Optimized implementation of concat(many_1(parser))

many_1_c_l(option \\ nil)

This is almost the same function as many_1_c/1, but it returns a result with metadata

many_1_l(option \\ nil)

This is almost the same function as many_1/1, but it returns a result with metadata

many_c(option \\ nil)

Optimized implementation of concat(many(parser))

many_c_l(option \\ nil)

This is almost the same function as many_c/1, but it returns a result with metadata

many_l(option \\ nil)

This is almost the same function as many/1, but it returns a result with metadata

map(option \\ nil)

Map the parser result

map_l(option \\ nil)

This is almost the same function as map/1, but it returns a result with metadata

not_char(option \\ nil)

Parse a not specified character

not_char_l(option \\ nil)

This is almost the same function as not_char/1, but it returns a result with metadata

option(option \\ nil)

Parse 0 times or once

option_l(option \\ nil)

This is almost the same function as option/1, but it returns a result with metadata

pick(option \\ nil)

Pick one value from the parser result

pick_l(option \\ nil)

This is almost the same function as pick/1, but it returns a result with metadata

regex(option \\ nil)

Parse a string which matches regex

regex_l(option \\ nil)

This is almost the same function as regex/1, but it returns a result with metadata

replace(option \\ nil)

Replace and Return the result of parser

replace_l(option \\ nil)

This is almost the same function as replace/1, but it returns a result with metadata

sequence(option \\ nil)

Parse in sequence

sequence_c(option \\ nil)

Optimized implementation of concat(sequence(parser))

sequence_c_l(option \\ nil)

This is almost the same function as sequence_c/1, but it returns a result with metadata

sequence_l(option \\ nil)

This is almost the same function as sequence/1, but it returns a result with metadata

slice(option \\ nil)

Slice the parser result

slice_l(option \\ nil)

This is almost the same function as slice/1, but it returns a result with metadata

string(option \\ nil)

Parse a specified string

string_l(option \\ nil)

This is almost the same function as string/1, but it returns a result with metadata

times(option \\ nil)

Parse X times

times_l(option \\ nil)

This is almost the same function as times/1, but it returns a result with metadata

unwrap(option \\ nil)

Put the value out of the parser result

unwrap_l(option \\ nil)

This is almost the same function as unwrap/1, but it returns a result with metadata

unwrap_r(option \\ nil)

Put the value out of the parser result recursively

unwrap_r_l(option \\ nil)

This is almost the same function as unwrap_r/1, but it returns a result with metadata

wrap(option \\ nil)

Put the parser result into an empty array

wrap_l(option \\ nil)

This is almost the same function as wrap/1, but it returns a result with metadata

Functions

any(option \\ nil)

Parse any character.

Source
any_l(option \\ nil)

This is almost the same function as any/1, but it returns a result with metadata.

Source
char(option \\ nil)

Parse a specified character.

Source
char_l(option \\ nil)

This is almost the same function as char/1, but it returns a result with metadata.

Source
check(option \\ nil)

Validate the parser result.

Source
check_l(option \\ nil)

This is almost the same function as check/1, but it returns a result with metadata.

Source
choice(option \\ nil)

Return a result of parser which succeeds first.

Source
choice_l(option \\ nil)

This is almost the same function as choice/1, but it returns a result with metadata.

Source
clean(option \\ nil)

Remove :empty from the parser result.

Source
clean_l(option \\ nil)

This is almost the same function as clean/1, but it returns a result with metadata.

Source
compress(option \\ nil)

Compress the parser result to a string.

Source
compress_l(option \\ nil)

This is almost the same function as compress/1, but it returns a result with metadata.

Source
concat(option \\ nil)

Flatten the parser result once.

Source
concat_l(option \\ nil)

This is almost the same function as concat/1, but it returns a result with metadata.

Source
default(option \\ nil)

Return a default value when parser failed.

Source
default_l(option \\ nil)

This is almost the same function as default/1, but it returns a result with metadata.

Source
dump(option \\ nil)

Dump the parser result.

Source
dump_l(option \\ nil)

This is almost the same function as dump/1, but it returns a result with metadata.

Source
eof(option \\ nil)

Parse the end of text.

Source
eof_l(option \\ nil)

This is almost the same function as eof/1, but it returns a result with metadata.

Source
flat(option \\ nil)

Flatten the parser result.

Source
flat_l(option \\ nil)

This is almost the same function as flat/1, but it returns a result with metadata.

Source
ignore(option \\ nil)

Ignore the parser result.

Source
ignore_l(option \\ nil)

This is almost the same function as ignore/1, but it returns a result with metadata.

Source
many(option \\ nil)

Parse 0 or more times.

Source
many_1(option \\ nil)

Parse 1 or more times.

Source
many_1_c(option \\ nil)

Optimized implementation of concat(many_1(parser)).

Source
many_1_c_l(option \\ nil)

This is almost the same function as many_1_c/1, but it returns a result with metadata.

Source
many_1_l(option \\ nil)

This is almost the same function as many_1/1, but it returns a result with metadata.

Source
many_c(option \\ nil)

Optimized implementation of concat(many(parser)).

Source
many_c_l(option \\ nil)

This is almost the same function as many_c/1, but it returns a result with metadata.

Source
many_l(option \\ nil)

This is almost the same function as many/1, but it returns a result with metadata.

Source
map(option \\ nil)

Map the parser result.

Source
map_l(option \\ nil)

This is almost the same function as map/1, but it returns a result with metadata.

Source
not_char(option \\ nil)

Parse a not specified character.

Source
not_char_l(option \\ nil)

This is almost the same function as not_char/1, but it returns a result with metadata.

Source
option(option \\ nil)

Parse 0 times or once.

Source
option_l(option \\ nil)

This is almost the same function as option/1, but it returns a result with metadata.

Source
pick(option \\ nil)

Pick one value from the parser result.

Source
pick_l(option \\ nil)

This is almost the same function as pick/1, but it returns a result with metadata.

Source
regex(option \\ nil)

Parse a string which matches regex.

Source
regex_l(option \\ nil)

This is almost the same function as regex/1, but it returns a result with metadata.

Source
replace(option \\ nil)

Replace and Return the result of parser.

Source
replace_l(option \\ nil)

This is almost the same function as replace/1, but it returns a result with metadata.

Source
sequence(option \\ nil)

Parse in sequence.

Source
sequence_c(option \\ nil)

Optimized implementation of concat(sequence(parser)).

Source
sequence_c_l(option \\ nil)

This is almost the same function as sequence_c/1, but it returns a result with metadata.

Source
sequence_l(option \\ nil)

This is almost the same function as sequence/1, but it returns a result with metadata.

Source
slice(option \\ nil)

Slice the parser result.

Source
slice_l(option \\ nil)

This is almost the same function as slice/1, but it returns a result with metadata.

Source
string(option \\ nil)

Parse a specified string.

Source
string_l(option \\ nil)

This is almost the same function as string/1, but it returns a result with metadata.

Source
times(option \\ nil)

Parse X times.

Source
times_l(option \\ nil)

This is almost the same function as times/1, but it returns a result with metadata.

Source
unwrap(option \\ nil)

Put the value out of the parser result.

Source
unwrap_l(option \\ nil)

This is almost the same function as unwrap/1, but it returns a result with metadata.

Source
unwrap_r(option \\ nil)

Put the value out of the parser result recursively.

Source
unwrap_r_l(option \\ nil)

This is almost the same function as unwrap_r/1, but it returns a result with metadata.

Source
wrap(option \\ nil)

Put the parser result into an empty array.

Source
wrap_l(option \\ nil)

This is almost the same function as wrap/1, but it returns a result with metadata.

Source