diff options
author | Lysandros Nikolaou <lisandrosnik@gmail.com> | 2021-06-10 22:52:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-10 22:52:49 (GMT) |
commit | 3ce35bfbbe29664942f9a8c50c177a4575a31934 (patch) | |
tree | 6750581ca8ece41efe970f0f0fb89a6d62f2a906 /Grammar | |
parent | 304ec53b53021ceddf62a38e66a06aed37e2ac41 (diff) | |
download | cpython-3ce35bfbbe29664942f9a8c50c177a4575a31934.zip cpython-3ce35bfbbe29664942f9a8c50c177a4575a31934.tar.gz cpython-3ce35bfbbe29664942f9a8c50c177a4575a31934.tar.bz2 |
[3.9] bpo-44385: Remove unused grammar rules (GH-26655) (GH-26659)
(cherry picked from commit e7b4644607789848f9752a3bd20ff216e25b4156)
Diffstat (limited to 'Grammar')
-rw-r--r-- | Grammar/python.gram | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/Grammar/python.gram b/Grammar/python.gram index 0e12b5c..544b4f7 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -600,11 +600,6 @@ del_t_atom[expr_ty]: | '(' a=[del_targets] ')' { _Py_Tuple(a, Del, EXTRA) } | '[' a=[del_targets] ']' { _Py_List(a, Del, EXTRA) } -targets[asdl_seq*]: a=','.target+ [','] { a } -target[expr_ty] (memo): - | a=t_primary '.' b=NAME !t_lookahead { _Py_Attribute(a, b->v.Name.id, Store, EXTRA) } - | a=t_primary '[' b=slices ']' !t_lookahead { _Py_Subscript(a, b, Store, EXTRA) } - | t_atom t_primary[expr_ty]: | a=t_primary '.' b=NAME &t_lookahead { _Py_Attribute(a, b->v.Name.id, Load, EXTRA) } | a=t_primary '[' b=slices ']' &t_lookahead { _Py_Subscript(a, b, Load, EXTRA) } @@ -616,12 +611,6 @@ t_primary[expr_ty]: EXTRA) } | a=atom &t_lookahead { a } t_lookahead: '(' | '[' | '.' -t_atom[expr_ty]: - | a=NAME { _PyPegen_set_expr_context(p, a, Store) } - | '(' a=target ')' { _PyPegen_set_expr_context(p, a, Store) } - | '(' b=[targets] ')' { _Py_Tuple(b, Store, EXTRA) } - | '[' b=[targets] ']' { _Py_List(b, Store, EXTRA) } - # From here on, there are rules for invalid syntax with specialised error messages invalid_arguments: |