File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111# "How to Change Python's Grammar"
1212
1313# Start symbols for the grammar:
14- # single_input is a single interactive statement;
15- # file_input is a module or sequence of commands read from an input file;
16- # eval_input is the input for the eval() and input() functions.
14+ # single_input is a single interactive statement;
15+ # file_input is a module or sequence of commands read from an input file;
16+ # eval_input is the input for the eval() and input() functions.
1717# NB: compound_stmt in single_input is followed by extra NEWLINE!
1818single_input: NEWLINE | simple_stmt | compound_stmt NEWLINE
1919file_input: (NEWLINE | stmt)* ENDMARKER
@@ -71,9 +71,9 @@ while_stmt: 'while' test ':' suite ['else' ':' suite]
7171for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite]
7272try_stmt: ('try' ':' suite
7373 ((except_clause ':' suite)+
74- ['else' ':' suite]
75- ['finally' ':' suite] |
76- 'finally' ':' suite))
74+ ['else' ':' suite]
75+ ['finally' ':' suite] |
76+ 'finally' ':' suite))
7777with_stmt: 'with' with_item (',' with_item)* ':' suite
7878with_item: test ['as' expr]
7979# NB compile.c makes sure that the default except clause is last
You can’t perform that action at this time.
0 commit comments