summaryrefslogtreecommitdiffstats
path: root/Grammar
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2006-09-06 06:28:06 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2006-09-06 06:28:06 (GMT)
commitca460d9722c9542004c4cf34d9231641ac18e34b (patch)
treeb007e31668de7ff4b37e0c8d80dc575e8b600118 /Grammar
parent98775dfebc86aca40b27dcca5e4f4fd3a07e8acb (diff)
downloadcpython-ca460d9722c9542004c4cf34d9231641ac18e34b.zip
cpython-ca460d9722c9542004c4cf34d9231641ac18e34b.tar.gz
cpython-ca460d9722c9542004c4cf34d9231641ac18e34b.tar.bz2
with and as are now keywords. There are some generated files I can't recreate.
Diffstat (limited to 'Grammar')
-rw-r--r--Grammar/Grammar6
1 files changed, 3 insertions, 3 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar
index c3709d2..83e5058 100644
--- a/Grammar/Grammar
+++ b/Grammar/Grammar
@@ -64,8 +64,8 @@ import_stmt: import_name | import_from
import_name: 'import' dotted_as_names
import_from: ('from' ('.'* dotted_name | '.'+)
'import' ('*' | '(' import_as_names ')' | import_as_names))
-import_as_name: NAME [('as' | NAME) NAME]
-dotted_as_name: dotted_name [('as' | NAME) NAME]
+import_as_name: NAME ['as' NAME]
+dotted_as_name: dotted_name ['as' NAME]
import_as_names: import_as_name (',' import_as_name)* [',']
dotted_as_names: dotted_as_name (',' dotted_as_name)*
dotted_name: NAME ('.' NAME)*
@@ -83,7 +83,7 @@ try_stmt: ('try' ':' suite
['finally' ':' suite] |
'finally' ':' suite))
with_stmt: 'with' test [ with_var ] ':' suite
-with_var: ('as' | NAME) expr
+with_var: 'as' expr
# NB compile.c makes sure that the default except clause is last
except_clause: 'except' [test [',' test]]
suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT