Module safe_regex_compiler::parser

source ·
Expand description

A parser for regular expressions.

§Features

  • Provides a parse function that converts a regular expression string into a FinalNode struct which is the root of an abstract syntax tree
  • Implements a straightforward contex-free grammar parser
  • Parses in a single pass
  • No recursion, no risk of stack overflow
  • forbid(unsafe)
  • Depends only on std
  • Good test coverage (92%)

§Limitations

  • Parses only raw byte strings, br"...".
  • Allocates. Uses Vec and String.

§Alternatives

Enums§

Functions§

  • Parses regex as a regular expression.