Skip to content

Commit 0dd236f

Browse files
committed
Revert some changes to the toplevel_components
1 parent eed407e commit 0dd236f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Doc/reference/toplevel_components.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ All input read from non-interactive files has the same form:
6969
.. grammar-snippet::
7070
:group: python-grammar
7171

72-
file: `statement`* ENDMARKER
72+
file_input: (`statement` | NEWLINE)* ENDMARKER
7373

7474
This syntax is used in the following situations:
7575

@@ -90,7 +90,7 @@ Input in interactive mode is parsed using the following grammar:
9090
.. grammar-snippet::
9191
:group: python-grammar
9292

93-
interactive: [`stmt_list`] NEWLINE | `compound_stmt` NEWLINE | ENDMARKER
93+
interactive_input: [`stmt_list`] NEWLINE | `compound_stmt` NEWLINE | ENDMARKER
9494

9595
Note that a (top-level) compound statement must be followed by a blank line in
9696
interactive mode; this is needed to help the parser detect the end of the input.
@@ -110,5 +110,4 @@ string argument to :func:`eval` must have the following form:
110110
.. grammar-snippet::
111111
:group: python-grammar
112112

113-
eval: `expressions` NEWLINE* ENDMARKER
114-
expressions: `expression` (',' `expression` )* [',']
113+
eval_input: `expression_list` NEWLINE* ENDMARKER

0 commit comments

Comments
 (0)