summary refs log tree commit diff stats
path: root/doc/grammar.txt
diff options
context:
space:
mode:
Diffstat (limited to 'doc/grammar.txt')
-rw-r--r--doc/grammar.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/doc/grammar.txt b/doc/grammar.txt
index 741e9b907..7fe2b56aa 100644
--- a/doc/grammar.txt
+++ b/doc/grammar.txt
@@ -104,11 +104,12 @@ exprStmt = simpleExpr
                           | IND{=} 'except' exprList ':' stmt
                           | IND{=} 'else' ':' stmt )*
            ))?
-importStmt = 'import' optInd expr
-              ((comma expr)*
+moduleName = expr ('as' expr)?
+importStmt = 'import' optInd moduleName
+              ((comma moduleName)*
               / 'except' optInd (expr ^+ comma))
 includeStmt = 'include' optInd expr ^+ comma
-fromStmt = 'from' expr 'import' optInd expr (comma expr)*
+fromStmt = 'from' moduleName 'import' optInd expr (comma expr)*
 returnStmt = 'return' optInd expr?
 raiseStmt = 'raise' optInd expr?
 yieldStmt = 'yield' optInd expr?