Python 3: "or" doesn't have optional come_from

This commit is contained in:
rocky
2016-10-05 22:54:50 -04:00
parent 649e4518fe
commit b52f341d46
3 changed files with 2 additions and 1 deletions

View File

@@ -453,7 +453,6 @@ class PythonParser(GenericASTBuilder):
_mklambda ::= load_closure mklambda _mklambda ::= load_closure mklambda
_mklambda ::= mklambda _mklambda ::= mklambda
or ::= expr jmp_true expr come_from_opt
and2 ::= _jump jmp_false COME_FROM expr COME_FROM and2 ::= _jump jmp_false COME_FROM expr COME_FROM
expr ::= conditional expr ::= conditional

View File

@@ -216,6 +216,7 @@ class Python2Parser(PythonParser):
expr ::= unary_convert expr ::= unary_convert
and ::= expr jmp_false expr come_from_opt and ::= expr jmp_false expr come_from_opt
or ::= expr jmp_true expr come_from_opt
slice0 ::= expr SLICE+0 slice0 ::= expr SLICE+0
slice0 ::= expr DUP_TOP SLICE+0 slice0 ::= expr DUP_TOP SLICE+0

View File

@@ -232,6 +232,7 @@ class Python3Parser(PythonParser):
WITH_CLEANUP END_FINALLY WITH_CLEANUP END_FINALLY
and ::= expr jmp_false expr COME_FROM and ::= expr jmp_false expr COME_FROM
or ::= expr jmp_true expr COME_FROM
''' '''
def p_misc3(self, args): def p_misc3(self, args):