aboutsummaryrefslogtreecommitdiff
path: root/src/Grammar
diff options
context:
space:
mode:
Diffstat (limited to 'src/Grammar')
-rw-r--r--src/Grammar30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/Grammar b/src/Grammar
index 574acd6..a6169d1 100644
--- a/src/Grammar
+++ b/src/Grammar
@@ -1,26 +1,26 @@
# Grammar for Python, version 4
# Changes compared to version 3:
-# Removed 'dir' statement.
-# Function call argument is a testlist instead of exprlist.
+# Removed 'dir' statement.
+# Function call argument is a testlist instead of exprlist.
# Changes compared to version 2:
-# The syntax of Boolean operations is changed to use more
-# conventional priorities: or < and < not.
+# The syntax of Boolean operations is changed to use more
+# conventional priorities: or < and < not.
# Changes compared to version 1:
-# modules and scripts are unified;
-# 'quit' is gone (use ^D);
-# empty_stmt is gone, replaced by explicit NEWLINE where appropriate;
-# 'import' and 'def' aren't special any more;
-# added 'from' NAME option on import clause, and '*' to import all;
-# added class definition.
+# modules and scripts are unified;
+# 'quit' is gone (use ^D);
+# empty_stmt is gone, replaced by explicit NEWLINE where appropriate;
+# 'import' and 'def' aren't special any more;
+# added 'from' NAME option on import clause, and '*' to import all;
+# added class definition.
# Start symbols for the grammar:
-# single_input is a single interactive statement;
-# file_input is a module or sequence of commands read from an input file;
-# expr_input is the input for the input() function;
-# eval_input is the input for the eval() function.
+# single_input is a single interactive statement;
+# file_input is a module or sequence of commands read from an input file;
+# expr_input is the input for the input() function;
+# eval_input is the input for the eval() function.
# NB: compound_stmt in single_input is followed by extra NEWLINE!
single_input: NEWLINE | simple_stmt | compound_stmt NEWLINE
@@ -34,7 +34,7 @@ fplist: fpdef (',' fpdef)*
fpdef: NAME | '(' fplist ')'
stmt: simple_stmt | compound_stmt
-simple_stmt: expr_stmt | print_stmt | pass_stmt | del_stmt | flow_stmt | import_stmt
+simple_stmt: expr_stmt | print_stmt | pass_stmt | del_stmt | flow_stmt | import_stmt
expr_stmt: (exprlist '=')* exprlist NEWLINE
# For assignments, additional restrictions enforced by the interpreter
print_stmt: 'print' (test ',')* [test] NEWLINE