summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2006-05-25 11:25:51 (GMT)
committerThomas Wouters <thomas@python.org>2006-05-25 11:25:51 (GMT)
commitcf8229ea3b0c0f56d261074bd9eb18b459ff8a8a (patch)
tree6be61921283a7adac8a6c25bdc9bd40aeebf43e8
parentc611f17418ae99a3d39819f3864f3212cf3bcc61 (diff)
downloadcpython-cf8229ea3b0c0f56d261074bd9eb18b459ff8a8a.zip
cpython-cf8229ea3b0c0f56d261074bd9eb18b459ff8a8a.tar.gz
cpython-cf8229ea3b0c0f56d261074bd9eb18b459ff8a8a.tar.bz2
Fix #1488915, Multiple dots in relative import statement raise SyntaxError.
-rw-r--r--Grammar/Grammar2
1 files changed, 1 insertions, 1 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar
index 8f248ef..c3709d2 100644
--- a/Grammar/Grammar
+++ b/Grammar/Grammar
@@ -62,7 +62,7 @@ yield_stmt: yield_expr
raise_stmt: 'raise' [test [',' test [',' test]]]
import_stmt: import_name | import_from
import_name: 'import' dotted_as_names
-import_from: ('from' ('.'* dotted_name | '.')
+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]