summaryrefslogtreecommitdiffstats
path: root/Parser/Python.asdl
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2006-01-27 15:18:39 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2006-01-27 15:18:39 (GMT)
commitc960f26044edaea6669e60859ecf590c63c65e62 (patch)
tree12bb6d51d908d5465a7520f931a67ca5eee6f183 /Parser/Python.asdl
parent3d344e8b07c84320422f7ce88e3f470c4d53138d (diff)
downloadcpython-c960f26044edaea6669e60859ecf590c63c65e62.zip
cpython-c960f26044edaea6669e60859ecf590c63c65e62.tar.gz
cpython-c960f26044edaea6669e60859ecf590c63c65e62.tar.bz2
Improved handling of syntax errors.
Expand set of errors caught in set_context(). Some new errors, some old error messages changed for consistency. Fixed error checking in generator expression code. The first set of tests were impossible condition given the grammar. In general, the ast code uses REQ() for those sanity checks. Fix some error handling for augmented assignments. As comments in the code explain, set_context() ought to work here, but I got unexpected crashes when I tried it. Should come back to this. Add note to Grammar that yield expression is a special case. Add doctest cases for SyntaxErrors raised by ast.c.
Diffstat (limited to 'Parser/Python.asdl')
-rw-r--r--Parser/Python.asdl1
1 files changed, 1 insertions, 0 deletions
diff --git a/Parser/Python.asdl b/Parser/Python.asdl
index d49138f..b0d383f 100644
--- a/Parser/Python.asdl
+++ b/Parser/Python.asdl
@@ -55,6 +55,7 @@ module Python
| Dict(expr* keys, expr* values)
| ListComp(expr elt, comprehension* generators)
| GeneratorExp(expr elt, comprehension* generators)
+ -- the grammar constrains where yield expressions can occur
| Yield(expr? value)
-- need sequences for compare to distinguish between
-- x < 4 < 3 and (x < 4) < 3