diff options
author | Lysandros Nikolaou <lisandrosnik@gmail.com> | 2021-06-10 22:05:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-10 22:05:06 (GMT) |
commit | e7b4644607789848f9752a3bd20ff216e25b4156 (patch) | |
tree | c0fb308482440ad1817f7b77df031c11c58db354 /Grammar | |
parent | 6544b2532df82d137b71323445a07a6e29bcdec0 (diff) | |
download | cpython-e7b4644607789848f9752a3bd20ff216e25b4156.zip cpython-e7b4644607789848f9752a3bd20ff216e25b4156.tar.gz cpython-e7b4644607789848f9752a3bd20ff216e25b4156.tar.bz2 |
bpo-44385: Remove unused grammar rules (GH-26655)
Automerge-Triggered-By: GH:lysnikolaou
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 d0f9bb0..0ccdc3e 100644 --- a/Grammar/python.gram +++ b/Grammar/python.gram @@ -811,11 +811,6 @@ del_t_atom[expr_ty]: | '(' a=[del_targets] ')' { _PyAST_Tuple(a, Del, EXTRA) } | '[' a=[del_targets] ']' { _PyAST_List(a, Del, EXTRA) } -targets[asdl_expr_seq*]: a[asdl_expr_seq*]=','.target+ [','] { a } -target[expr_ty] (memo): - | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Store, EXTRA) } - | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Store, EXTRA) } - | t_atom t_primary[expr_ty]: | a=t_primary '.' b=NAME &t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Load, EXTRA) } | a=t_primary '[' b=slices ']' &t_lookahead { _PyAST_Subscript(a, b, Load, EXTRA) } @@ -828,12 +823,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] ')' { _PyAST_Tuple(b, Store, EXTRA) } - | '[' b=[targets] ']' { _PyAST_List(b, Store, EXTRA) } - # From here on, there are rules for invalid syntax with specialised error messages invalid_arguments: |