Crate yes_parser

Source
Expand description

Your Extensible Script Parser

Provides YesDocParser to parse YES documents from file or from strings. The entry-points are:

  • `YesDocParser::from_file
  • `YesDocParser::from_string

Both take an optional list of Literal structs which denote custom begin and end tokens. Both entry-points will append the result from List::build_quotes() regardless if any custom literals are also provided.

Literals instruct the parser which span of characters, called a token, will be considered when finding the next key-value pair. This implies, by default, that quoted strings can be parsed correctly so that they can be key or a value even if they contain reserved symbols.

Modules§

element
element_parser
enums
keyval
literal
utils

Structs§

YesDocParser
The entry-point for parsing YES documents and scriplets. It is responsible for tracking the total number of lines fed, the line being built (in the event of multi-lines), the attributes for the next standard element, and collecting the results of the ElementParser::read routine.

Enums§

ParseResult
Custom Result enum with both variants having a field line_number.