Bug in for loop with try. Add more of 2.7's COME_FROM statements.

spark.py: add tracing reduce rules. main: reduce cutsines.
Start history
This commit is contained in:
rocky
2015-12-21 21:08:08 -05:00
parent 6b0bb124ea
commit 6a49cd2c69
12 changed files with 225 additions and 27 deletions

View File

@@ -1,8 +1,11 @@
Files in this directory contain very simnple constructs that work
across all versions of Python.
Their simnplicity is to try to make it easier to debug grammar
and AST walking routines.
Their simplicity is to try to make it easier to debug scanner, grammar
and semantic-action routines.
We also try to make the code here runnable by Python and when run should
not produce an error.
The numbers in the filenames are to assist running the programs from
the simplest to more complex. For example, many tests have assignment

View File

@@ -0,0 +1,5 @@
for i in (1,2):
try:
x = 1
except ValueError:
y = 2

View File

@@ -1,5 +1,8 @@
# Tests:
# forstmt ::= SETUP_LOOP expr _for designator
# for_block POP_BLOCK COME_FROM
for a in b:
c = d
for a in [1]:
c = 2
for a in range(2):
c = 2