@@ -811,11 +811,6 @@ del_t_atom[expr_ty]:
811
811
| '(' a=[del_targets] ')' { _PyAST_Tuple(a, Del, EXTRA) }
812
812
| '[' a=[del_targets] ']' { _PyAST_List(a, Del, EXTRA) }
813
813
814
- targets[asdl_expr_seq*]: a[asdl_expr_seq*]=','.target+ [','] { a }
815
- target[expr_ty] (memo):
816
- | a=t_primary '.' b=NAME !t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Store, EXTRA) }
817
- | a=t_primary '[' b=slices ']' !t_lookahead { _PyAST_Subscript(a, b, Store, EXTRA) }
818
- | t_atom
819
814
t_primary[expr_ty]:
820
815
| a=t_primary '.' b=NAME &t_lookahead { _PyAST_Attribute(a, b->v.Name.id, Load, EXTRA) }
821
816
| a=t_primary '[' b=slices ']' &t_lookahead { _PyAST_Subscript(a, b, Load, EXTRA) }
@@ -828,12 +823,6 @@ t_primary[expr_ty]:
828
823
EXTRA) }
829
824
| a=atom &t_lookahead { a }
830
825
t_lookahead: '(' | '[' | '.'
831
- t_atom[expr_ty]:
832
- | a=NAME { _PyPegen_set_expr_context(p, a, Store) }
833
- | '(' a=target ')' { _PyPegen_set_expr_context(p, a, Store) }
834
- | '(' b=[targets] ')' { _PyAST_Tuple(b, Store, EXTRA) }
835
- | '[' b=[targets] ']' { _PyAST_List(b, Store, EXTRA) }
836
-
837
826
838
827
# From here on, there are rules for invalid syntax with specialised error messages
839
828
invalid_arguments:
0 commit comments