WIP deal with JUMP_IF_{TRUE,FALSE} vs with POP version

This commit is contained in:
rocky
2016-06-24 20:06:10 -04:00
parent fa7d8f955a
commit fa84f4277a
4 changed files with 17 additions and 3 deletions

View File

@@ -38,11 +38,21 @@ class Python26Parser(Python2Parser):
"""
def p_whilestmt(self, args):
"""
whilestmt ::= SETUP_LOOP
testexpr
l_stmts_opt jb_pop
POP_BLOCK _come_from
"""
def p_misc26(self, args):
"""
jmp_true ::= JUMP_IF_TRUE POP_TOP
jmp_false ::= JUMP_IF_FALSE POP_TOP
jf_pop ::= JUMP_FORWARD POP_TOP
jb_pop ::= JUMP_BACK POP_TOP
_ifstmts_jump ::= c_stmts_opt jf_pop COME_FROM
"""