[−][src]Crate lip
Lip Parsing Library
Lip provides powerful parser combinators for you to create reusable and flexible parsers.
Macros
chain | Chain several parsers together and parse them in sequence. |
one_of | Parse one of many things. |
Structs
BoxedParser | Box |
Located | Add location information to any type. |
Location | Records the location of a character within the source string. |
Enums
ParseResult | Records the result of the parser. |
Traits
Parser |
Functions
any_char | Match any single character, usually used together with |
display_error | Pretty print the error. |
either | Choose either the left parser or the right parser to parse. |
indent | Parse an indentation specified the number of spaces. |
indents | Parse a given number of indentations specified the number of spaces. |
left | Run the left parser, then the right, last keep the left result and discard the right. |
line_comment | Parse a line comment started with |
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_char | Parse a single newline character. |
newline_with_comment | Parse a newline that maybe preceeded by a comment started with |
one_or_more | Run the parser one or more times and combine each output into a vector of outputs. |
one_or_more_till_end | Run the parser one or more times and combine each output into a vector of outputs, until the end of the source string. |
optional | Optionally parse something. Returns supplied default value if parse failed. |
pair | Pair up two parsers. Run the left parser, then the right, and last combine both outputs into a tuple. |
right | Run the left parser, then the right, last keep the right result and discard the left. |
space0 | Parse zero or more space characters. |
space1 | Parse one or more space characters. |
space_char | Parse a single space character. |
token | Parse a given token string. |
whole_decimal | Parses a whole decimal number. |
zero_or_more | Run the parser zero or more times and combine each output into a vector of outputs. |