Add rules (a list of string) to grammar. Note that the rules must not be those that set arg_count in the custom dictionary.
(self, rules, customize)
| 135 | return |
| 136 | |
| 137 | def add_unique_rules(self, rules, customize): |
| 138 | """Add rules (a list of string) to grammar. Note that |
| 139 | the rules must not be those that set arg_count in the |
| 140 | custom dictionary. |
| 141 | """ |
| 142 | for rule in rules: |
| 143 | if len(rule) == 0: |
| 144 | continue |
| 145 | opname = rule.split("::=")[0].strip() |
| 146 | self.add_unique_rule(rule, opname, 0, customize) |
| 147 | return |
| 148 | |
| 149 | def add_unique_doc_rules(self, rules_str, customize): |
| 150 | """Add rules (a docstring-like list of rules) to grammar. |
no test coverage detected