From 4a1da2689181a69236debfeac0b13729fdaecf76 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Sat, 7 Jan 1995 10:25:36 +0000 Subject: [PATCH] changed import to support NAME.NAME...NAME --- Grammar/Grammar | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Grammar/Grammar b/Grammar/Grammar index 1e9ce77530d..5af4483acfa 100644 --- a/Grammar/Grammar +++ b/Grammar/Grammar @@ -40,7 +40,8 @@ break_stmt: 'break' continue_stmt: 'continue' return_stmt: 'return' [testlist] raise_stmt: 'raise' test [',' test] -import_stmt: 'import' NAME (',' NAME)* | 'from' NAME 'import' ('*' | NAME (',' NAME)*) +import_stmt: 'import' dotted_name (',' dotted_name)* | 'from' dotted_name 'import' ('*' | NAME (',' NAME)*) +dotted_name: NAME ('.' NAME)* global_stmt: 'global' NAME (',' NAME)* access_stmt: 'access' ('*' | NAME (',' NAME)*) ':' accesstype (',' accesstype)* accesstype: NAME+