summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-07 10:25:36 (GMT)
committerGuido van Rossum <guido@python.org>1995-01-07 10:25:36 (GMT)
commit4a1da2689181a69236debfeac0b13729fdaecf76 (patch)
treea96849bbd75db438bfcd61b35e6859f4cd0d99db
parent03d4c260e30502d42e1827dea574dd221e83b05f (diff)
downloadcpython-4a1da2689181a69236debfeac0b13729fdaecf76.zip
cpython-4a1da2689181a69236debfeac0b13729fdaecf76.tar.gz
cpython-4a1da2689181a69236debfeac0b13729fdaecf76.tar.bz2
changed import to support NAME.NAME...NAME
-rw-r--r--Grammar/Grammar3
1 files changed, 2 insertions, 1 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar
index 1e9ce77..5af4483 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+