grammatica.grammar.String#

class grammatica.grammar.String(value)[source]#

Grammar that exactly matches a string.

Parameters:

value (Iterable[str]) – Characters to match exactly.

Attributes

value

String to match exactly.

Methods

as_string([indent])

Return a string representation of the grammar.

attrs_dict()

Return instance attributes of the grammar.

copy()

Create a copy of the grammar.

equals(other[, check_quantifier])

Check equality with another value.

render([full, wrap])

Render the grammar as a regular expression.

simplify()

Simplify the grammar.