diff options
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: |