@@ -180,7 +180,7 @@ DEF_RULE(try_stmt_except_and_more, nc, and(3), rule(try_stmt_except_list), opt_r
180180DEF_RULE (try_stmt_except , nc , and (4 ), tok (KW_EXCEPT ), opt_rule (try_stmt_as_name ), tok (DEL_COLON ), rule (suite ))
181181DEF_RULE (try_stmt_as_name , nc , and (2 ), rule (test ), opt_rule (as_name ))
182182DEF_RULE (try_stmt_except_list , nc , one_or_more , rule (try_stmt_except ))
183- DEF_RULE (try_stmt_finally , nc , and (3 ), tok (KW_FINALLY ), tok (DEL_COLON ), rule (suite ))
183+ DEF_RULE (try_stmt_finally , nc , ident | and (3 ), tok (KW_FINALLY ), tok (DEL_COLON ), rule (suite ))
184184DEF_RULE (else_stmt , nc , ident | and (3 ), tok (KW_ELSE ), tok (DEL_COLON ), rule (suite ))
185185DEF_RULE (with_stmt , c (with_stmt ), and (4 ), tok (KW_WITH ), rule (with_stmt_list ), tok (DEL_COLON ), rule (suite ))
186186DEF_RULE (with_stmt_list , nc , list , rule (with_item ), tok (DEL_COMMA ))
@@ -247,8 +247,7 @@ DEF_RULE(power_dbl_star, nc, ident | and(2), tok(OP_DBL_STAR), rule(factor))
247247// testlist_comp: (test|star_expr) ( comp_for | (',' (test|star_expr))* [','] )
248248// trailer: '(' [arglist] ')' | '[' subscriptlist ']' | '.' NAME
249249
250- DEF_RULE (atom , nc , or (11 ), tok (NAME ), tok (INTEGER ), tok (FLOAT_OR_IMAG ), rule (atom_string ), tok (ELLIPSIS ), tok (KW_NONE ), tok (KW_TRUE ), tok (KW_FALSE ), rule (atom_paren ), rule (atom_bracket ), rule (atom_brace ))
251- DEF_RULE (atom_string , c (atom_string ), one_or_more , rule (string_or_bytes ))
250+ DEF_RULE (atom , nc , or (12 ), tok (NAME ), tok (INTEGER ), tok (FLOAT_OR_IMAG ), tok (STRING ), tok (BYTES ), tok (ELLIPSIS ), tok (KW_NONE ), tok (KW_TRUE ), tok (KW_FALSE ), rule (atom_paren ), rule (atom_bracket ), rule (atom_brace ))
252251DEF_RULE (string_or_bytes , nc , or (2 ), tok (STRING ), tok (BYTES ))
253252DEF_RULE (atom_paren , c (atom_paren ), and (3 ), tok (DEL_PAREN_OPEN ), opt_rule (atom_2b ), tok (DEL_PAREN_CLOSE ))
254253DEF_RULE (atom_2b , nc , or (2 ), rule (yield_expr ), rule (testlist_comp ))
@@ -276,7 +275,7 @@ DEF_RULE(subscript_3, c(subscript_3), and(2), tok(DEL_COLON), opt_rule(subscript
276275DEF_RULE (subscript_3b , nc , or (2 ), rule (subscript_3c ), rule (subscript_3d ))
277276DEF_RULE (subscript_3c , nc , and (2 ), tok (DEL_COLON ), opt_rule (test ))
278277DEF_RULE (subscript_3d , nc , and (2 ), rule (test ), opt_rule (sliceop ))
279- DEF_RULE (sliceop , nc , and (2 ), tok (DEL_COLON ), opt_rule (test ))
278+ DEF_RULE (sliceop , nc , ident | and (2 ), tok (DEL_COLON ), opt_rule (test ))
280279#else
281280DEF_RULE (subscriptlist , c (generic_tuple ), list_with_end , rule (test ), tok (DEL_COMMA ))
282281#endif
0 commit comments