mirror of
https://github.com/davidhalter/parso.git
synced 2026-05-19 23:10:16 +08:00
Make the 3.5 grammar more similar to its original.
This commit is contained in:
@@ -15,8 +15,8 @@
|
|||||||
# file_input is a module or sequence of commands read from an input file;
|
# file_input is a module or sequence of commands read from an input file;
|
||||||
# eval_input is the input for the eval() functions.
|
# eval_input is the input for the eval() functions.
|
||||||
# NB: compound_stmt in single_input is followed by extra NEWLINE!
|
# NB: compound_stmt in single_input is followed by extra NEWLINE!
|
||||||
file_input: (NEWLINE | stmt)* ENDMARKER
|
|
||||||
single_input: NEWLINE | simple_stmt | compound_stmt NEWLINE
|
single_input: NEWLINE | simple_stmt | compound_stmt NEWLINE
|
||||||
|
file_input: (NEWLINE | stmt)* ENDMARKER
|
||||||
eval_input: testlist NEWLINE* ENDMARKER
|
eval_input: testlist NEWLINE* ENDMARKER
|
||||||
|
|
||||||
decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE
|
decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE
|
||||||
@@ -136,7 +136,7 @@ arglist: argument (',' argument)* [',']
|
|||||||
# to our LL(1) parser. Even though 'test' includes '*expr' in star_expr,
|
# to our LL(1) parser. Even though 'test' includes '*expr' in star_expr,
|
||||||
# we explicitly match '*' here, too, to give it proper precedence.
|
# we explicitly match '*' here, too, to give it proper precedence.
|
||||||
# Illegal combinations and orderings are blocked in ast.c:
|
# Illegal combinations and orderings are blocked in ast.c:
|
||||||
# multiple (test comp_for) arguements are blocked; keyword unpackings
|
# multiple (test comp_for) arguments are blocked; keyword unpackings
|
||||||
# that precede iterable unpackings are blocked; etc.
|
# that precede iterable unpackings are blocked; etc.
|
||||||
argument: ( test [comp_for] |
|
argument: ( test [comp_for] |
|
||||||
test '=' test |
|
test '=' test |
|
||||||
|
|||||||
Reference in New Issue
Block a user