Module parse

Source
Expand description

This module provides a regular expression parser.

Structsยง

NestLimiter ๐Ÿ”’
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.
Parser
A regular expression parser.
ParserBuilder
A builder for a regular expression parser.
ParserI ๐Ÿ”’
ParserI is the internal parser implementation.

Enumsยง

ClassState ๐Ÿ”’
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.
GroupState ๐Ÿ”’
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 ๐Ÿ”’