Crate rusty_parser

source ·

Macros§

  • Or combinator of parsers Example: or_!( parser_a, or_b, or_c )
  • Sequence of parsers Example: seq!( parser_a, and_then_b, and_then_c )

Structs§

  • Dictionary using trie implementation uses BTreeMap; O(log(N)) search
  • Dictionary using trie implementation uses HashMap; O(1) search
  • a Box<dyn Parser> wrapper for iterators of std::str::Chars This can take any parser with Output of Output
  • a Box<dyn Parser> wrapper for iterators of std::slice::Iter This can take any parser with Output of Output
  • struct that holds the result of parsing output: parsed data it: iterator after parsing Result of parsing
  • Rc<Parser> wrapper;
  • RefCell<Parser> wrapper;

Traits§

  • Parser trait all parsers must implement this trait

Functions§

  • create a Box<dyn Parser> wrapper for iterators of std::str::Chars This can take any parser with Output of Output
  • create a Box<dyn Parser> wrapper for iterators of std::slice::Iter This can take any parser with Output of Output
  • This Parser will compare the input string starts with the given string.
  • This Parser will always success and return the clone of given output.
  • parser that success if reached end of input
  • This Parser will always fail.
  • change Parser’s Output to Iterator Pair [begin, end)
  • Map parser’s Output to new value
  • match the input with the given parser This does not construct the output, just check the input is matched or not.
  • Check one character is equal to the given character.
  • this parser always success whether the input is matched or not
  • Or combinator of parsers
  • parse the input with the given parser
  • This Parser will use the closure to parse the input.
  • Check one character is in the given range.
  • create Rc<Parser> wrapper
  • parser reference wrapper
  • create RefCell<Parser> wrapper
  • repeat parser for given range ( this matches as long as possible )
  • concatenate two parser
  • This Parser will compare the input string starts with the given slice
  • change Parser’s Output to (). This internally call match_pattern() instead of parse()