minor fix

This commit is contained in:
emile 2019-05-30 19:58:02 +02:00
parent fd088d4e3c
commit 388a68e1fc

View File

@ -52,7 +52,7 @@ class RegexInterpreter(AbstractInterpreter):
def isValid(self,f)->bool:
formula = f.s.replace("!", "\\!")
formula = "({0})".format(f.s.replace("!", "\\!"))
make_reg = lambda formula,pattern: 'echo "{0}" | grep -P "{1}"'.format(formula,pattern)
def check_assertion(formula, pattern):
@ -192,7 +192,7 @@ if len(sys.argv) > 1 :
for l in u:
print(Formula(l,i).isValid())
else:
print(Formula( sys.argv[1],i).isValid())
print(Formula( sys.argv[1] if sys.argv[1] != '-g' else sys.argv[2],i).isValid())
else:
print("help?")