Expand description
§Lip Parsing Library
Lip provides powerful parser combinators for you to create reusable and flexible parsers.
Macros§
Structs§
- AndThen
- Backtrackable
- End
- FnParser
- Ignore
- Keep
- Located
- Add location information to any type.
- Location
- Records the location of a character within the source string.
- Map
- MapErr
- MapWith
State - Parse
Err - ParseOk
- Pred
- Skip
- Update
- Update
State
Enums§
- OneOf
Three - OneOf
Two - Parse
Result - Records the result of the parser.
- Trailing
- What’s the deal with trailing commas? Are they Forbidden? Are they Optional? Are they Mandatory?
Traits§
Functions§
- chomp_
if - Chomp one grapheme if it passes the test.
- chomp_
ifc - Chomp one character if it passes the test.
- chomp_
while0 - Chomp zero or more graphemes if they pass the test.
- chomp_
while0c - Chomp zero or more characters if they pass the test.
- chomp_
while1 - Chomp one or more graphemes if they pass the test.
- chomp_
while1c - Chomp one or more characters if they pass the test.
- display_
error - Pretty print the error.
- float
- Parses a floating point number, excluding the sign in front.
- fn_
parser - indent
- Parse an indentation specified the number of spaces.
- indents
- Parse a given number of indentations specified the number of spaces.
- int
- Parses a decimal integer, excluding the sign in front.
- line_
comment - Parse a line comment started with
comment_symbol
. - located
- Record the beginning and ending location of the thing being parsed.
- newline0
- Parsers zero or more newline characters, each with indentations in front.
- newline1
- Parsers one or more newline characters, each with indentations in front.
- newline_
with_ comment - Parse a newline that maybe preceeded by a comment started with
comment_symbol
. - one_
or_ more - Run the parser one or more times and combine each output into a vector of outputs.
- one_
or_ more_ until - Run the parser one or more times until an end delimiter (or end of input) and combine each output into a vector of outputs.
- optional
- Optionally parse something.
- optional_
with_ default - Optionally parse something. Returns supplied default value if parse failed.
- problem
- Indicate that a parser has reached a dead end.
- repeat
- Repeat a parser n times
- sequence
- Parse a sequence like lists or code blocks.
- space0
- Parse zero or more space characters.
- space1
- Parse one or more space characters.
- take_
chomped - Take the chomped string from a bunch of chompers.
- token
- Parse a given token string.
- variable
- Parse a variable.
- zero_
or_ more - Run the parser zero or more times and combine each output into a vector of outputs.
- zero_
or_ more_ until - Run the parser zero or more times until an end delimiter (or end of input) and combine each output into a vector of outputs.