Module gchemol_parser::parsers

source ·
Expand description

Selected and extra winnow parser combinators

Re-exports§

Traits§

  • Core trait for parsing
  • Marks the input as being the complete buffer or a partial buffer for streaming input

Functions§

  • Recognizes zero or more lowercase and uppercase ASCII alphabetic characters: 'a'..='z', 'A'..='Z'
  • Recognizes one or more lowercase and uppercase ASCII alphabetic characters: 'a'..='z', 'A'..='Z'
  • Transforms an ErrMode::Backtrack (recoverable) to ErrMode::Cut (unrecoverable)
  • Sequence three parsers, only returning the output of the second.
  • Recognizes zero or more ASCII numerical characters: '0'..='9'
  • Recognizes one or more ASCII numerical characters: '0'..='9'
  • Parse a f64 float number
  • Recognizes an end of line (both "\n" and "\r\n").
  • Take and consuming to literal.
  • Take until found literal. The literal will not be consumed.
  • Create context label
  • Recognizes an end of line (both "\n" and "\r\n").
  • Anything except whitespace, this parser will not consume “\n” character
  • Convert winnow error to anyhow Error with input context
  • Convert a string to a float.
  • Sequence two parsers, only returning the output from the second.
  • Parse a line containing a float number possibly surrounded by spaces
  • Parse a line containing many float numbers
  • Read a new line including eol (\n) or consume the rest if there is no eol char.
  • Parse a line containing an unsigned integer number.
  • Parse a line containing many unsigned numbers
  • Recognize one or more decimal digits, optionally preceded by sign
  • Accumulate the output of a parser into a container, like Vec
  • Accumulate the output of parser f into a container, like Vec, until the parser g produces a result.
  • Return the remaining input.
  • Take the rest line. The line ending is not included.
  • Parse a normal float number. The D format code for scientific (exponential) notation is also supported.
  • Accumulate the output of a parser, interleaved with sep
  • Match one signed integer: -123 or +123
  • Keep reading lines until the innner parser produces a result
  • Recognizes zero or more spaces and tabs.
  • Recognizes zero or more spaces and tabs.
  • Sequence two parsers, only returning the output of the first.
  • Match one unsigned integer: 123
  • A combinator that takes a parser inner and produces a parser that also consumes both leading and trailing whitespace, returning the output of inner.
  • Consume three float numbers separated by one or more spaces. Return xyz array.

Type Aliases§