Another python 3 ELSE fixes and ...

Makefile:
  - test python 3.0 bytecode
  - turn full --verify back on Python 3.x
This commit is contained in:
rocky
2016-12-10 06:36:22 -05:00
parent 2c993f8c32
commit 38eed14b41
3 changed files with 19 additions and 12 deletions

View File

@@ -142,6 +142,10 @@ class Python3Parser(PythonParser):
jf_else ::= JUMP_FORWARD ELSE
ja_else ::= JUMP_ABSOLUTE ELSE
# Note: in if/else kinds of statements, we err on the side
# of missing "else" clauses. Therefore we include grammar
# rules with and without ELSE.
ifelsestmt ::= testexpr c_stmts_opt JUMP_FORWARD else_suite COME_FROM
ifelsestmt ::= testexpr c_stmts_opt jf_else else_suite _come_from
@@ -152,7 +156,6 @@ class Python3Parser(PythonParser):
ifelsestmtl ::= testexpr c_stmts_opt JUMP_BACK else_suitel
# FIXME: this feels like a hack. Is it just 1 or two
# COME_FROMs? the parsed tree for this and even with just the
# one COME_FROM for Python 2.7 seems to associate the
@@ -373,7 +376,10 @@ class Python3Parser(PythonParser):
def p_expr3(self, args):
"""
conditional ::= expr jmp_false expr jf_else expr COME_FROM
conditional ::= expr jmp_false expr jf_else expr COME_FROM
conditionalnot ::= expr jmp_true expr jf_else expr COME_FROM
expr ::= LOAD_CLASSNAME
# Python 3.4+