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