From 8ae1295c5b6cfef0fc6db5c97fe68a0b40de8331 Mon Sep 17 00:00:00 2001 From: Thomas Wouters Date: Tue, 28 Feb 2006 22:42:15 +0000 Subject: Make 'as' an actual keyword when with's future statement is used. Not actually necessary for functionality, but good for transition. --- Grammar/Grammar | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Grammar') diff --git a/Grammar/Grammar b/Grammar/Grammar index 08c8a00846..9f66df648d 100644 --- a/Grammar/Grammar +++ b/Grammar/Grammar @@ -61,8 +61,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 [NAME NAME] -dotted_as_name: dotted_name [NAME NAME] +import_as_name: NAME [('as' | NAME) NAME] +dotted_as_name: dotted_name [('as' | NAME) NAME] import_as_names: import_as_name (',' import_as_name)* [','] dotted_as_names: dotted_as_name (',' dotted_as_name)* dotted_name: NAME ('.' NAME)* @@ -80,7 +80,7 @@ try_stmt: ('try' ':' suite ['finally' ':' suite] | 'finally' ':' suite)) with_stmt: 'with' test [ with_var ] ':' suite -with_var: NAME expr +with_var: ('as' | NAME) 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 -- cgit v1.2.1