buildingmotif.label_parsing.combinators#
Functions
|
If the parser matches, add a new Identifier token after every Constant token in the result. |
Classes
|
Constructs a choice combinator of string matching based on a dictionary. |
|
Constructs a choice combinator of parsers. |
|
Matches a constant token. |
|
Adds the type to the token result. |
|
Applies the given sequence parser repeatedly until it stops matching. |
|
Applies the given parser, but does not fail if it does not match. |
|
Constructs a parser that matches a regular expression. |
|
Constructs a parser that matches the rest of the string. |
|
Applies parsers in sequence. |
|
Constructs a parser that matches a string. |
|
Constructs a parser that matches a substring of length n. |
|
Constructs a parser that matches everything until the given parser matches. |
- class substring_n(*args, **kwargs)[source]#
Constructs a parser that matches a substring of length n.
- class abbreviations(*args, **kwargs)[source]#
Constructs a choice combinator of string matching based on a dictionary.
- class sequence(*args, **kwargs)[source]#
Applies parsers in sequence. All parsers must match consecutively.
- class many(*args, **kwargs)[source]#
Applies the given sequence parser repeatedly until it stops matching.
- class maybe(*args, **kwargs)[source]#
Applies the given parser, but does not fail if it does not match.