Small Python 2 grammar reduction

This commit is contained in:
rocky
2017-11-28 11:18:11 -05:00
parent 1a137780ad
commit 05ab491d2e
3 changed files with 1 additions and 2 deletions

View File

@@ -475,7 +475,6 @@ class PythonParser(GenericASTBuilder):
_mklambda ::= mklambda
expr ::= conditional
conditional ::= expr jmp_false expr JUMP_FORWARD expr COME_FROM
ret_expr ::= expr
ret_expr ::= ret_and

View File

@@ -104,7 +104,6 @@ class Python2Parser(PythonParser):
mapexpr ::= BUILD_MAP kvlist
classdef ::= buildclass designator
buildclass ::= LOAD_CONST expr mkfunc

View File

@@ -89,6 +89,7 @@ class Python27Parser(Python2Parser):
expr ::= conditionalTrue
conditionalTrue ::= expr JUMP_FORWARD expr COME_FROM
conditional ::= expr jmp_false expr JUMP_FORWARD expr COME_FROM
"""
def p_stmt27(self, args):