Index: compile_rules_graph.py ================================================================== --- compile_rules_graph.py +++ compile_rules_graph.py @@ -379,12 +379,10 @@ for sActionName, aAction in dACTIONS.items(): print(sActionName, aAction) print("\nFunctions:") print(sPyCallables) - checkRegexes(dAllGraph) - # Result return { "graph_callables": sPyCallables, "rules_graphs": dAllGraph, "rules_actions": dACTIONS Index: darg.py ================================================================== --- darg.py +++ darg.py @@ -5,10 +5,13 @@ """ # by Olivier R. # License: MPL 2 +import re +import traceback + from graphspell.progressbar import ProgressBar class DARG: @@ -140,27 +143,27 @@ else: for sArc, nKey in val.items(): val[sArc] = dKeyTrans[nKey] return dNewGraph - def _checkRegexes (dGraph): + def _checkRegexes (self, dGraph): "check validity of regexes" aRegex = set() for nKey, dVal in dGraph.items(): if "" in dVal: for sRegex in dVal[""]: if sRegex not in aRegex: - _checkRegex(sRegex) + self._checkRegex(sRegex) aRegex.add(sRegex) if "" in dVal: for sRegex in dVal[""]: if sRegex not in aRegex: - _checkRegex(sRegex) + self._checkRegex(sRegex) aRegex.add(sRegex) aRegex.clear() - def _checkRegex (sRegex): + def _checkRegex (self, sRegex): #print(sRegex) if "¬" in sRegex: sPattern, sNegPattern = sRegex.split("¬") try: if not sNegPattern: