Create a rule parser. Parsing rule after rule will construct the RuleParser.rule and RuleParser.ignore members. :param long_tokens: Whether to support multiple character tokens. Requires the tokens be comma or whitespace (or both) separated. Defaults to False.
(self, long_tokens=False)
| 35 | """ |
| 36 | |
| 37 | def __init__(self, long_tokens=False): |
| 38 | """Create a rule parser. |
| 39 | |
| 40 | Parsing rule after rule will construct the RuleParser.rule and RuleParser.ignore members. |
| 41 | |
| 42 | :param long_tokens: Whether to support multiple character tokens. Requires the tokens be |
| 43 | comma or whitespace (or both) separated. Defaults to False. |
| 44 | """ |
| 45 | self.rules: MultiDict[TokenName, RuleMapping] = MultiDict() |
| 46 | self.ignore: Set[TokenName] = set() |
| 47 | self.long_tokens = long_tokens |
| 48 | |
| 49 | @staticmethod |
| 50 | def __get_grammars(long_tokens: bool): |
nothing calls this directly
no outgoing calls
no test coverage detected