xd
This commit is contained in:
parent
427d769aa6
commit
23abf51c5f
@ -30,20 +30,24 @@ class SimpleInterpreter(AbstractInterpreter):
|
||||
|
||||
prev = formula.s[i-1] if i>0 else None #None, gdy jesteśmy na pierwszym znaku
|
||||
if (char=='(' and isVariable(prev) and prev is not None): #a(b|c)
|
||||
|
||||
return False
|
||||
if (prev is None):
|
||||
if not (isVariable(char) or isParentice(char) or isNegation(char)):
|
||||
|
||||
return False
|
||||
if isSign(char):
|
||||
if isSign(char) and prev is not None:
|
||||
|
||||
if (not isNegation(char)):
|
||||
|
||||
if isSign(prev) and not isNegation(prev): # tylko negacje mogą się powtarzać po innym znaku
|
||||
return False
|
||||
if isNegation(prev):
|
||||
|
||||
if not (isNegation(char) or isParentice(char)):
|
||||
print("xd")
|
||||
|
||||
return False
|
||||
if isNegation(char):
|
||||
if isVariable(prev): #a!
|
||||
return False
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user