get_quantifier
Parse a quantifier from the input, where "ch" is the first character in the quantifier.
Return the minimum number of occurrences permitted by the quantifier and
either None or the next character from the input_iter if the next character
is not part of the quantifier.
def get_quantifier(
ch: string,
input_iter: iterator
) - > tuple
Parse a quantifier from the input, where "ch" is the first character in the quantifier.
Parameters
| Name | Type | Description |
|---|---|---|
| ch | string | The first character of the quantifier sequence being parsed (e.g., '*', '+', '?', or '{'). |
| input_iter | iterator | An iterator yielding tuples of (character, is_escaped) used to consume subsequent characters of the quantifier. |
Returns
| Type | Description |
|---|---|
tuple | A tuple containing the minimum number of occurrences permitted by the quantifier and either None or the next character from the input_iter if the next character is not part of the quantifier. |