And objects#

Constructor#

And(subexprs[, quantifier])

Grouped grammar that represents a logical AND operation between grammars.

Attributes#

And.separator

Separator to use for the grammar.

And.subexprs

Group of grammars.

And.quantifier

Minimum and maximum repetitions the expression must match.

Rendering#

And.render([full, wrap])

Render the grammar as a regular expression.

And.render_quantifier()

Render the quantifier.

And.needs_wrapped()

Check if the expression needs to be wrapped in parentheses.

And.as_string([indent])

Return a string representation of the grammar.

Simplification#

And.simplify()

Simplify the grammar.

And.simplify_subexprs(original_subexprs, ...)

Simplify the provided subexpressions for the grouped grammar.

Utility#

And.copy()

Create a copy of the grammar.

And.equals(other[, check_quantifier])

Check equality with another value.

Metadata#

Warning

And.attrs_dict is considered experimental and may change without warning.

And.attrs_dict()

Return instance attributes of the grammar.