Grammalecte  Diff

Differences From Artifact [02fc45c534]:

To Artifact [ad8b8ac55e]:


   165    165           #print(sRegex)
   166    166           if "¬" in sRegex:
   167    167               sPattern, sNegPattern = sRegex.split("¬")
   168    168               try:
   169    169                   if not sNegPattern:
   170    170                       print("# Warning! Empty negpattern:", sRegex)
   171    171                   re.compile(sPattern)
   172         -                re.compile(sNegPattern)
          172  +                if sNegPattern != "*":
          173  +                    re.compile(sNegPattern)
   173    174               except:
   174    175                   print("# Error. Wrong regex:", sRegex)
   175         -                traceback.print_exc()
   176    176                   exit()
   177    177           else:
   178    178               try:
   179    179                   if not sRegex:
   180    180                       print("# Warning! Empty pattern:", sRegex)
   181    181                   re.compile(sRegex)
   182    182               except:
   183    183                   print("# Error. Wrong regex:", sRegex)
   184         -                traceback.print_exc()
   185    184                   exit()
   186    185   
   187    186   
   188    187   class Node:
   189    188       """Node of the rule graph"""
   190    189   
   191    190       NextId = 0