File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Grammar for Python, version 5
22
33# Changes compared to version 4:
4+ # Blank lines and lines only containing a comment are now eaten
5+ # by the lexer, so the NEWLINE* things in suite are gone
6+ # (but the 2nd NEWLINE terminating single_input stays!)
47# Semicolons can separate small statements
58# 'continue' statement
69# Dictionary constructors: {key:value, key:value, ...}
@@ -59,7 +62,7 @@ while_stmt: 'while' test ':' suite ['else' ':' suite]
5962for_stmt: 'for' exprlist 'in' testlist ':' suite ['else' ':' suite]
6063try_stmt: 'try' ':' suite (except_clause ':' suite)* ['finally' ':' suite]
6164except_clause: 'except' [test [',' test]]
62- suite: simple_stmt | NEWLINE INDENT NEWLINE* ( stmt NEWLINE*) + DEDENT
65+ suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT
6366
6467test: and_test ('or' and_test)*
6568and_test: not_test ('and' not_test)*
You can’t perform that action at this time.
0 commit comments