Module regex_syntax::ast::parse
source ยท Expand description
This module provides a regular expression parser.
Structsยง
- Nest
Limiter ๐A type that traverses a fully parsed Ast and checks whether its depth exceeds the specified nesting limit. If it does, then an error is returned. - A regular expression parser.
- A builder for a regular expression parser.
- ParserI ๐ParserI is the internal parser implementation.
Enumsยง
- Class
State ๐ClassState represents a single stack frame while parsing character classes. Each frame records the state up to an intersection, difference, symmetric difference or nested class. - Group
State ๐GroupState represents a single stack frame while parsing nested groups and alternations. Each frame records the state up to an opening parenthesis or a alternating bracket|
. - Primitive ๐A primitive is an expression with no sub-expressions. This includes literals, assertions and non-set character classes. This representation is used as intermediate state in the parser.
Functionsยง
- is_
capture_ ๐char Returns true if the given character is a valid in a capture group name. - is_hex ๐Returns true if the given character is a hexadecimal digit.
- specialize_
err ๐When the result is an error, transforms the ast::ErrorKind from the source Result into another one. This function is used to return clearer error messages when possible.
Type Aliasesยง
- Result ๐