diff options
Diffstat (limited to 'Grammar')
-rw-r--r-- | Grammar/Grammar | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Grammar/Grammar b/Grammar/Grammar index 8a7eb59..9e4dad8 100644 --- a/Grammar/Grammar +++ b/Grammar/Grammar @@ -51,9 +51,13 @@ continue_stmt: 'continue' return_stmt: 'return' [testlist] yield_stmt: 'yield' testlist raise_stmt: 'raise' [test [',' test [',' test]]] -import_stmt: 'import' dotted_as_name (',' dotted_as_name)* | 'from' dotted_name 'import' ('*' | import_as_name (',' import_as_name)*) +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_names: import_as_name (',' import_as_name)* [','] +dotted_as_names: dotted_as_name (',' dotted_as_name)* dotted_name: NAME ('.' NAME)* global_stmt: 'global' NAME (',' NAME)* exec_stmt: 'exec' expr ['in' test [',' test]] |