Mercurial > repos > bimib > cobraxy
comparison COBRAxy/src/utils/rule_parsing.py @ 542:fcdbc81feb45 draft
Uploaded
| author | francesco_lapi | 
|---|---|
| date | Sun, 26 Oct 2025 19:27:41 +0000 | 
| parents | 2fb97466e404 | 
| children | 
   comparison
  equal
  deleted
  inserted
  replaced
| 541:fa93040a75af | 542:fcdbc81feb45 | 
|---|---|
| 7 - OpList: nested list structure representing parsed rules with explicit operator | 7 - OpList: nested list structure representing parsed rules with explicit operator | 
| 8 - RuleStack: helper stack to build nested OpLists during parsing | 8 - RuleStack: helper stack to build nested OpLists during parsing | 
| 9 - parseRuleToNestedList: main entry to parse a rule string into an OpList | 9 - parseRuleToNestedList: main entry to parse a rule string into an OpList | 
| 10 """ | 10 """ | 
| 11 from enum import Enum | 11 from enum import Enum | 
| 12 import utils.general_utils as utils | |
| 13 from typing import List, Union, Optional | 12 from typing import List, Union, Optional | 
| 13 | |
| 14 try: | |
| 15 from . import general_utils as utils | |
| 16 except: | |
| 17 import general_utils as utils | |
| 14 | 18 | 
| 15 class RuleErr(utils.CustomErr): | 19 class RuleErr(utils.CustomErr): | 
| 16 """ | 20 """ | 
| 17 Error type for rule syntax errors. | 21 Error type for rule syntax errors. | 
| 18 """ | 22 """ | 
