Module safe_regex_compiler::parser
source · [−]Expand description
A parser for regular expressions.
Features
- Provides a
parsefunction that converts a regular expression string into aFinalNodestruct 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
VecandString.
Alternatives
regex-syntax- Mature
- Popular
- Maintained by the core Rust language developers
- Full of features
regular-expression- No documentation
Enums
An element of a regular expression character class.
A completely parsed element of a regular expression abstract syntax tree (AST).
An AST node used during parsing.
AST nodes used internally during parsing.
Functions
Parses regex as a regular expression.