Python 3.x needs conditional_not

This commit is contained in:
rocky 2017-12-04 08:40:06 -05:00
parent 6ecaa16cd5
commit 3425851dc7
8 changed files with 8 additions and 2 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -269,7 +269,7 @@ class Python26Parser(Python2Parser):
return_stmt_lambda LAMBDA_MARKER
# conditional_true are for conditions which always evaluate true
# There is dead or non-optional remnants of the condition code though,
# There is dead or non-optional remnants of the condition code though,
# and we use that to match on to reconstruct the source more accurately
expr ::= conditional_true
conditional_true ::= expr jf_pop expr COME_FROM

View File

@ -85,7 +85,7 @@ class Python27Parser(Python2Parser):
compare_chained2 ::= expr COMPARE_OP RETURN_VALUE
# conditional_true are for conditions which always evaluate true
# There is dead or non-optional remnants of the condition code though,
# There is dead or non-optional remnants of the condition code though,
# and we use that to match on to reconstruct the source more accurately
expr ::= conditional_true
conditional_true ::= expr JUMP_FORWARD expr COME_FROM

View File

@ -404,6 +404,12 @@ class Python3Parser(PythonParser):
# a JUMP_FORWARD to another JUMP_FORWARD can get turned into
# a JUMP_ABSOLUTE with no COME_FROM
conditional ::= expr jmp_false expr jump_absolute_else expr
# conditional_true are for conditions which always evaluate true
# There is dead or non-optional remnants of the condition code though,
# and we use that to match on to reconstruct the source more accurately
expr ::= conditional_true
conditional_true ::= expr JUMP_FORWARD expr COME_FROM
"""
@staticmethod