Merge branch 'master' into python-2.4

This commit is contained in:
rocky
2020-01-26 12:00:11 -05:00
54 changed files with 794 additions and 639 deletions

View File

@@ -87,7 +87,7 @@ class PythonParser(GenericASTBuilder):
# singleton reduction that we can simplify. It also happens to be optional
# in its other derivation
self.optional_nt |= frozenset(
("come_froms", "suite_stmts", "l_stmts_opt", "c_stmts_opt")
("come_froms", "suite_stmts", "l_stmts_opt", "c_stmts_opt", "stmts_opt", "stmt")
)
# Reduce singleton reductions in these nonterminals:
@@ -300,6 +300,9 @@ class PythonParser(GenericASTBuilder):
c_stmts_opt ::= c_stmts
c_stmts_opt ::= pass
stmts_opt ::= _stmts
stmts_opt ::= pass
# statements inside a loop
l_stmts ::= _stmts
l_stmts ::= returns