Grammar "COME_FROM"_from cleanups ...

tryelse constructs in 2.x fixed up
_come_from -> _come_froms (COME_FROM*)
consolidate come_froms rule into sincle parser.py
This commit is contained in:
rocky
2017-12-03 05:10:59 -05:00
parent b1cdbe1656
commit 32f3d947bb
8 changed files with 37 additions and 41 deletions

View File

@@ -61,9 +61,6 @@ class Python27Parser(Python2Parser):
def p_jump27(self, args):
"""
come_froms ::= come_froms COME_FROM
come_froms ::= COME_FROM
iflaststmtl ::= testexpr c_stmts_opt
_ifstmts_jump ::= c_stmts_opt JUMP_FORWARD come_froms
@@ -112,7 +109,7 @@ class Python27Parser(Python2Parser):
while1stmt ::= SETUP_LOOP return_stmts bp_come_from
while1stmt ::= SETUP_LOOP l_stmts_opt JUMP_BACK POP_BLOCK COME_FROM
whilestmt ::= SETUP_LOOP testexpr l_stmts_opt JUMP_BACK POP_BLOCK _come_from
whilestmt ::= SETUP_LOOP testexpr l_stmts_opt JUMP_BACK POP_BLOCK _come_froms
while1elsestmt ::= SETUP_LOOP l_stmts JUMP_BACK POP_BLOCK
else_suite COME_FROM
whileelsestmt ::= SETUP_LOOP testexpr l_stmts_opt JUMP_BACK POP_BLOCK