summaryrefslogtreecommitdiffstats
path: root/Parser/pegen/parse.c
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2020-09-02 20:30:51 (GMT)
committerGitHub <noreply@github.com>2020-09-02 20:30:51 (GMT)
commit8de34cdb952a2e3b8d7a9a213845cad01a8cece3 (patch)
tree539f50127a5a8c0e42983eec54687e0b3c41b30a /Parser/pegen/parse.c
parenta763ee3c583e6a2dfe1b1ac0600a48e8a978ed50 (diff)
downloadcpython-8de34cdb952a2e3b8d7a9a213845cad01a8cece3.zip
cpython-8de34cdb952a2e3b8d7a9a213845cad01a8cece3.tar.gz
cpython-8de34cdb952a2e3b8d7a9a213845cad01a8cece3.tar.bz2
[3.9] bpo-41690: Use a loop to collect args in the parser instead of recursion (GH-22053) (GH-22067)
This program can segfault the parser by stack overflow: ``` import ast code = "f(" + ",".join(['a' for _ in range(100000)]) + ")" print("Ready!") ast.parse(code) ``` the reason is that the rule for arguments has a simple recursion when collecting args: args[expr_ty]: [...] | a=named_expression b=[',' c=args { c }] { [...] }. (cherry picked from commit 4a97b1517a6b5ff22e2984b677a680b07ff0ce11) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Diffstat (limited to 'Parser/pegen/parse.c')
-rw-r--r--Parser/pegen/parse.c1092
1 files changed, 589 insertions, 503 deletions
diff --git a/Parser/pegen/parse.c b/Parser/pegen/parse.c
index d9dd23c..c7304ed 100644
--- a/Parser/pegen/parse.c
+++ b/Parser/pegen/parse.c
@@ -343,34 +343,34 @@ static KeywordToken *reserved_keywords[] = {
#define _loop1_105_type 1265
#define _loop0_106_type 1266
#define _loop0_107_type 1267
-#define _tmp_108_type 1268
-#define _tmp_109_type 1269
-#define _loop0_111_type 1270
-#define _gather_110_type 1271
-#define _loop0_113_type 1272
-#define _gather_112_type 1273
-#define _loop0_115_type 1274
-#define _gather_114_type 1275
-#define _loop0_117_type 1276
-#define _gather_116_type 1277
-#define _loop0_118_type 1278
-#define _loop0_120_type 1279
-#define _gather_119_type 1280
-#define _tmp_121_type 1281
-#define _loop0_123_type 1282
-#define _gather_122_type 1283
-#define _loop0_125_type 1284
-#define _gather_124_type 1285
-#define _tmp_126_type 1286
-#define _loop0_127_type 1287
+#define _loop0_109_type 1268
+#define _gather_108_type 1269
+#define _tmp_110_type 1270
+#define _loop0_112_type 1271
+#define _gather_111_type 1272
+#define _loop0_114_type 1273
+#define _gather_113_type 1274
+#define _loop0_116_type 1275
+#define _gather_115_type 1276
+#define _loop0_118_type 1277
+#define _gather_117_type 1278
+#define _loop0_119_type 1279
+#define _loop0_121_type 1280
+#define _gather_120_type 1281
+#define _tmp_122_type 1282
+#define _loop0_124_type 1283
+#define _gather_123_type 1284
+#define _loop0_126_type 1285
+#define _gather_125_type 1286
+#define _tmp_127_type 1287
#define _loop0_128_type 1288
#define _loop0_129_type 1289
-#define _tmp_130_type 1290
+#define _loop0_130_type 1290
#define _tmp_131_type 1291
-#define _loop0_132_type 1292
-#define _tmp_133_type 1293
-#define _loop0_134_type 1294
-#define _tmp_135_type 1295
+#define _tmp_132_type 1292
+#define _loop0_133_type 1293
+#define _tmp_134_type 1294
+#define _loop0_135_type 1295
#define _tmp_136_type 1296
#define _tmp_137_type 1297
#define _tmp_138_type 1298
@@ -386,10 +386,12 @@ static KeywordToken *reserved_keywords[] = {
#define _tmp_148_type 1308
#define _tmp_149_type 1309
#define _tmp_150_type 1310
-#define _loop1_151_type 1311
-#define _loop1_152_type 1312
-#define _tmp_153_type 1313
-#define _tmp_154_type 1314
+#define _tmp_151_type 1311
+#define _tmp_152_type 1312
+#define _loop1_153_type 1313
+#define _loop1_154_type 1314
+#define _tmp_155_type 1315
+#define _tmp_156_type 1316
static mod_ty file_rule(Parser *p);
static mod_ty interactive_rule(Parser *p);
@@ -659,34 +661,34 @@ static asdl_seq *_gather_103_rule(Parser *p);
static asdl_seq *_loop1_105_rule(Parser *p);
static asdl_seq *_loop0_106_rule(Parser *p);
static asdl_seq *_loop0_107_rule(Parser *p);
-static void *_tmp_108_rule(Parser *p);
-static void *_tmp_109_rule(Parser *p);
-static asdl_seq *_loop0_111_rule(Parser *p);
-static asdl_seq *_gather_110_rule(Parser *p);
-static asdl_seq *_loop0_113_rule(Parser *p);
-static asdl_seq *_gather_112_rule(Parser *p);
-static asdl_seq *_loop0_115_rule(Parser *p);
-static asdl_seq *_gather_114_rule(Parser *p);
-static asdl_seq *_loop0_117_rule(Parser *p);
-static asdl_seq *_gather_116_rule(Parser *p);
+static asdl_seq *_loop0_109_rule(Parser *p);
+static asdl_seq *_gather_108_rule(Parser *p);
+static void *_tmp_110_rule(Parser *p);
+static asdl_seq *_loop0_112_rule(Parser *p);
+static asdl_seq *_gather_111_rule(Parser *p);
+static asdl_seq *_loop0_114_rule(Parser *p);
+static asdl_seq *_gather_113_rule(Parser *p);
+static asdl_seq *_loop0_116_rule(Parser *p);
+static asdl_seq *_gather_115_rule(Parser *p);
static asdl_seq *_loop0_118_rule(Parser *p);
-static asdl_seq *_loop0_120_rule(Parser *p);
-static asdl_seq *_gather_119_rule(Parser *p);
-static void *_tmp_121_rule(Parser *p);
-static asdl_seq *_loop0_123_rule(Parser *p);
-static asdl_seq *_gather_122_rule(Parser *p);
-static asdl_seq *_loop0_125_rule(Parser *p);
-static asdl_seq *_gather_124_rule(Parser *p);
-static void *_tmp_126_rule(Parser *p);
-static asdl_seq *_loop0_127_rule(Parser *p);
+static asdl_seq *_gather_117_rule(Parser *p);
+static asdl_seq *_loop0_119_rule(Parser *p);
+static asdl_seq *_loop0_121_rule(Parser *p);
+static asdl_seq *_gather_120_rule(Parser *p);
+static void *_tmp_122_rule(Parser *p);
+static asdl_seq *_loop0_124_rule(Parser *p);
+static asdl_seq *_gather_123_rule(Parser *p);
+static asdl_seq *_loop0_126_rule(Parser *p);
+static asdl_seq *_gather_125_rule(Parser *p);
+static void *_tmp_127_rule(Parser *p);
static asdl_seq *_loop0_128_rule(Parser *p);
static asdl_seq *_loop0_129_rule(Parser *p);
-static void *_tmp_130_rule(Parser *p);
+static asdl_seq *_loop0_130_rule(Parser *p);
static void *_tmp_131_rule(Parser *p);
-static asdl_seq *_loop0_132_rule(Parser *p);
-static void *_tmp_133_rule(Parser *p);
-static asdl_seq *_loop0_134_rule(Parser *p);
-static void *_tmp_135_rule(Parser *p);
+static void *_tmp_132_rule(Parser *p);
+static asdl_seq *_loop0_133_rule(Parser *p);
+static void *_tmp_134_rule(Parser *p);
+static asdl_seq *_loop0_135_rule(Parser *p);
static void *_tmp_136_rule(Parser *p);
static void *_tmp_137_rule(Parser *p);
static void *_tmp_138_rule(Parser *p);
@@ -702,10 +704,12 @@ static void *_tmp_147_rule(Parser *p);
static void *_tmp_148_rule(Parser *p);
static void *_tmp_149_rule(Parser *p);
static void *_tmp_150_rule(Parser *p);
-static asdl_seq *_loop1_151_rule(Parser *p);
-static asdl_seq *_loop1_152_rule(Parser *p);
-static void *_tmp_153_rule(Parser *p);
-static void *_tmp_154_rule(Parser *p);
+static void *_tmp_151_rule(Parser *p);
+static void *_tmp_152_rule(Parser *p);
+static asdl_seq *_loop1_153_rule(Parser *p);
+static asdl_seq *_loop1_154_rule(Parser *p);
+static void *_tmp_155_rule(Parser *p);
+static void *_tmp_156_rule(Parser *p);
// file: statements? $
@@ -12232,7 +12236,7 @@ arguments_rule(Parser *p)
return _res;
}
-// args: starred_expression [',' args] | kwargs | named_expression [',' args]
+// args: ','.(starred_expression | named_expression !'=')+ [',' kwargs] | kwargs
static expr_ty
args_rule(Parser *p)
{
@@ -12252,31 +12256,22 @@ args_rule(Parser *p)
UNUSED(_start_lineno); // Only used by EXTRA macro
int _start_col_offset = p->tokens[_mark]->col_offset;
UNUSED(_start_col_offset); // Only used by EXTRA macro
- { // starred_expression [',' args]
+ { // ','.(starred_expression | named_expression !'=')+ [',' kwargs]
if (p->error_indicator) {
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> args[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "starred_expression [',' args]"));
- expr_ty a;
+ D(fprintf(stderr, "%*c> args[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','.(starred_expression | named_expression !'=')+ [',' kwargs]"));
+ asdl_seq * a;
void *b;
if (
- (a = starred_expression_rule(p)) // starred_expression
+ (a = _gather_108_rule(p)) // ','.(starred_expression | named_expression !'=')+
&&
- (b = _tmp_108_rule(p), 1) // [',' args]
+ (b = _tmp_110_rule(p), 1) // [',' kwargs]
)
{
- D(fprintf(stderr, "%*c+ args[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "starred_expression [',' args]"));
- Token *_token = _PyPegen_get_last_nonnwhitespace_token(p);
- if (_token == NULL) {
- D(p->level--);
- return NULL;
- }
- int _end_lineno = _token->end_lineno;
- UNUSED(_end_lineno); // Only used by EXTRA macro
- int _end_col_offset = _token->end_col_offset;
- UNUSED(_end_col_offset); // Only used by EXTRA macro
- _res = _Py_Call ( _PyPegen_dummy_name ( p ) , ( b ) ? CHECK ( _PyPegen_seq_insert_in_front ( p , a , ( ( expr_ty ) b ) -> v . Call . args ) ) : CHECK ( _PyPegen_singleton_seq ( p , a ) ) , ( b ) ? ( ( expr_ty ) b ) -> v . Call . keywords : NULL , EXTRA );
+ D(fprintf(stderr, "%*c+ args[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','.(starred_expression | named_expression !'=')+ [',' kwargs]"));
+ _res = _PyPegen_collect_call_seqs ( p , a , b );
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
D(p->level--);
@@ -12286,7 +12281,7 @@ args_rule(Parser *p)
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s args[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "starred_expression [',' args]"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "','.(starred_expression | named_expression !'=')+ [',' kwargs]"));
}
{ // kwargs
if (p->error_indicator) {
@@ -12321,42 +12316,6 @@ args_rule(Parser *p)
D(fprintf(stderr, "%*c%s args[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "kwargs"));
}
- { // named_expression [',' args]
- if (p->error_indicator) {
- D(p->level--);
- return NULL;
- }
- D(fprintf(stderr, "%*c> args[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "named_expression [',' args]"));
- expr_ty a;
- void *b;
- if (
- (a = named_expression_rule(p)) // named_expression
- &&
- (b = _tmp_109_rule(p), 1) // [',' args]
- )
- {
- D(fprintf(stderr, "%*c+ args[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "named_expression [',' args]"));
- Token *_token = _PyPegen_get_last_nonnwhitespace_token(p);
- if (_token == NULL) {
- D(p->level--);
- return NULL;
- }
- int _end_lineno = _token->end_lineno;
- UNUSED(_end_lineno); // Only used by EXTRA macro
- int _end_col_offset = _token->end_col_offset;
- UNUSED(_end_col_offset); // Only used by EXTRA macro
- _res = _Py_Call ( _PyPegen_dummy_name ( p ) , ( b ) ? CHECK ( _PyPegen_seq_insert_in_front ( p , a , ( ( expr_ty ) b ) -> v . Call . args ) ) : CHECK ( _PyPegen_singleton_seq ( p , a ) ) , ( b ) ? ( ( expr_ty ) b ) -> v . Call . keywords : NULL , EXTRA );
- if (_res == NULL && PyErr_Occurred()) {
- p->error_indicator = 1;
- D(p->level--);
- return NULL;
- }
- goto done;
- }
- p->mark = _mark;
- D(fprintf(stderr, "%*c%s args[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "named_expression [',' args]"));
- }
_res = NULL;
done:
D(p->level--);
@@ -12387,11 +12346,11 @@ kwargs_rule(Parser *p)
asdl_seq * a;
asdl_seq * b;
if (
- (a = _gather_110_rule(p)) // ','.kwarg_or_starred+
+ (a = _gather_111_rule(p)) // ','.kwarg_or_starred+
&&
(_literal = _PyPegen_expect_token(p, 12)) // token=','
&&
- (b = _gather_112_rule(p)) // ','.kwarg_or_double_starred+
+ (b = _gather_113_rule(p)) // ','.kwarg_or_double_starred+
)
{
D(fprintf(stderr, "%*c+ kwargs[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','.kwarg_or_starred+ ',' ','.kwarg_or_double_starred+"));
@@ -12413,13 +12372,13 @@ kwargs_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> kwargs[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','.kwarg_or_starred+"));
- asdl_seq * _gather_114_var;
+ asdl_seq * _gather_115_var;
if (
- (_gather_114_var = _gather_114_rule(p)) // ','.kwarg_or_starred+
+ (_gather_115_var = _gather_115_rule(p)) // ','.kwarg_or_starred+
)
{
D(fprintf(stderr, "%*c+ kwargs[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','.kwarg_or_starred+"));
- _res = _gather_114_var;
+ _res = _gather_115_var;
goto done;
}
p->mark = _mark;
@@ -12432,13 +12391,13 @@ kwargs_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> kwargs[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','.kwarg_or_double_starred+"));
- asdl_seq * _gather_116_var;
+ asdl_seq * _gather_117_var;
if (
- (_gather_116_var = _gather_116_rule(p)) // ','.kwarg_or_double_starred+
+ (_gather_117_var = _gather_117_rule(p)) // ','.kwarg_or_double_starred+
)
{
D(fprintf(stderr, "%*c+ kwargs[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','.kwarg_or_double_starred+"));
- _res = _gather_116_var;
+ _res = _gather_117_var;
goto done;
}
p->mark = _mark;
@@ -12800,7 +12759,7 @@ star_targets_rule(Parser *p)
if (
(a = star_target_rule(p)) // star_target
&&
- (b = _loop0_118_rule(p)) // ((',' star_target))*
+ (b = _loop0_119_rule(p)) // ((',' star_target))*
&&
(_opt_var = _PyPegen_expect_token(p, 12), 1) // ','?
)
@@ -12854,7 +12813,7 @@ star_targets_seq_rule(Parser *p)
UNUSED(_opt_var); // Silence compiler warnings
asdl_seq * a;
if (
- (a = _gather_119_rule(p)) // ','.star_target+
+ (a = _gather_120_rule(p)) // ','.star_target+
&&
(_opt_var = _PyPegen_expect_token(p, 12), 1) // ','?
)
@@ -12917,7 +12876,7 @@ star_target_rule(Parser *p)
if (
(_literal = _PyPegen_expect_token(p, 16)) // token='*'
&&
- (a = _tmp_121_rule(p)) // !'*' star_target
+ (a = _tmp_122_rule(p)) // !'*' star_target
)
{
D(fprintf(stderr, "%*c+ star_target[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'*' (!'*' star_target)"));
@@ -13439,7 +13398,7 @@ del_targets_rule(Parser *p)
UNUSED(_opt_var); // Silence compiler warnings
asdl_seq * a;
if (
- (a = _gather_122_rule(p)) // ','.del_target+
+ (a = _gather_123_rule(p)) // ','.del_target+
&&
(_opt_var = _PyPegen_expect_token(p, 12), 1) // ','?
)
@@ -13780,7 +13739,7 @@ targets_rule(Parser *p)
UNUSED(_opt_var); // Silence compiler warnings
asdl_seq * a;
if (
- (a = _gather_124_rule(p)) // ','.target+
+ (a = _gather_125_rule(p)) // ','.target+
&&
(_opt_var = _PyPegen_expect_token(p, 12), 1) // ','?
)
@@ -14492,7 +14451,7 @@ incorrect_arguments_rule(Parser *p)
&&
(_literal = _PyPegen_expect_token(p, 12)) // token=','
&&
- (_opt_var = _tmp_126_rule(p), 1) // [args | expression for_if_clauses]
+ (_opt_var = _tmp_127_rule(p), 1) // [args | expression for_if_clauses]
)
{
D(fprintf(stderr, "%*c+ incorrect_arguments[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression for_if_clauses ',' [args | expression for_if_clauses]"));
@@ -14750,7 +14709,7 @@ invalid_assignment_rule(Parser *p)
D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_named_expression ',' star_named_expressions* ':' expression"));
Token * _literal;
Token * _literal_1;
- asdl_seq * _loop0_127_var;
+ asdl_seq * _loop0_128_var;
expr_ty a;
expr_ty expression_var;
if (
@@ -14758,7 +14717,7 @@ invalid_assignment_rule(Parser *p)
&&
(_literal = _PyPegen_expect_token(p, 12)) // token=','
&&
- (_loop0_127_var = _loop0_127_rule(p)) // star_named_expressions*
+ (_loop0_128_var = _loop0_128_rule(p)) // star_named_expressions*
&&
(_literal_1 = _PyPegen_expect_token(p, 11)) // token=':'
&&
@@ -14815,10 +14774,10 @@ invalid_assignment_rule(Parser *p)
}
D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "((star_targets '='))* star_expressions '='"));
Token * _literal;
- asdl_seq * _loop0_128_var;
+ asdl_seq * _loop0_129_var;
expr_ty a;
if (
- (_loop0_128_var = _loop0_128_rule(p)) // ((star_targets '='))*
+ (_loop0_129_var = _loop0_129_rule(p)) // ((star_targets '='))*
&&
(a = star_expressions_rule(p)) // star_expressions
&&
@@ -14845,10 +14804,10 @@ invalid_assignment_rule(Parser *p)
}
D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "((star_targets '='))* yield_expr '='"));
Token * _literal;
- asdl_seq * _loop0_129_var;
+ asdl_seq * _loop0_130_var;
expr_ty a;
if (
- (_loop0_129_var = _loop0_129_rule(p)) // ((star_targets '='))*
+ (_loop0_130_var = _loop0_130_rule(p)) // ((star_targets '='))*
&&
(a = yield_expr_rule(p)) // yield_expr
&&
@@ -14874,7 +14833,7 @@ invalid_assignment_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> invalid_assignment[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions augassign (yield_expr | star_expressions)"));
- void *_tmp_130_var;
+ void *_tmp_131_var;
expr_ty a;
AugOperator* augassign_var;
if (
@@ -14882,7 +14841,7 @@ invalid_assignment_rule(Parser *p)
&&
(augassign_var = augassign_rule(p)) // augassign
&&
- (_tmp_130_var = _tmp_130_rule(p)) // yield_expr | star_expressions
+ (_tmp_131_var = _tmp_131_rule(p)) // yield_expr | star_expressions
)
{
D(fprintf(stderr, "%*c+ invalid_assignment[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions augassign (yield_expr | star_expressions)"));
@@ -15093,11 +15052,11 @@ invalid_comprehension_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> invalid_comprehension[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('[' | '(' | '{') starred_expression for_if_clauses"));
- void *_tmp_131_var;
+ void *_tmp_132_var;
expr_ty a;
asdl_seq* for_if_clauses_var;
if (
- (_tmp_131_var = _tmp_131_rule(p)) // '[' | '(' | '{'
+ (_tmp_132_var = _tmp_132_rule(p)) // '[' | '(' | '{'
&&
(a = starred_expression_rule(p)) // starred_expression
&&
@@ -15194,13 +15153,13 @@ invalid_parameters_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> invalid_parameters[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default* (slash_with_default | param_with_default+) param_no_default"));
- asdl_seq * _loop0_132_var;
- void *_tmp_133_var;
+ asdl_seq * _loop0_133_var;
+ void *_tmp_134_var;
arg_ty param_no_default_var;
if (
- (_loop0_132_var = _loop0_132_rule(p)) // param_no_default*
+ (_loop0_133_var = _loop0_133_rule(p)) // param_no_default*
&&
- (_tmp_133_var = _tmp_133_rule(p)) // slash_with_default | param_with_default+
+ (_tmp_134_var = _tmp_134_rule(p)) // slash_with_default | param_with_default+
&&
(param_no_default_var = param_no_default_rule(p)) // param_no_default
)
@@ -15242,13 +15201,13 @@ invalid_lambda_parameters_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> invalid_lambda_parameters[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default* (lambda_slash_with_default | lambda_param_with_default+) lambda_param_no_default"));
- asdl_seq * _loop0_134_var;
- void *_tmp_135_var;
+ asdl_seq * _loop0_135_var;
+ void *_tmp_136_var;
arg_ty lambda_param_no_default_var;
if (
- (_loop0_134_var = _loop0_134_rule(p)) // lambda_param_no_default*
+ (_loop0_135_var = _loop0_135_rule(p)) // lambda_param_no_default*
&&
- (_tmp_135_var = _tmp_135_rule(p)) // lambda_slash_with_default | lambda_param_with_default+
+ (_tmp_136_var = _tmp_136_rule(p)) // lambda_slash_with_default | lambda_param_with_default+
&&
(lambda_param_no_default_var = lambda_param_no_default_rule(p)) // lambda_param_no_default
)
@@ -15290,11 +15249,11 @@ invalid_star_etc_rule(Parser *p)
}
D(fprintf(stderr, "%*c> invalid_star_etc[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'*' (')' | ',' (')' | '**'))"));
Token * _literal;
- void *_tmp_136_var;
+ void *_tmp_137_var;
if (
(_literal = _PyPegen_expect_token(p, 16)) // token='*'
&&
- (_tmp_136_var = _tmp_136_rule(p)) // ')' | ',' (')' | '**')
+ (_tmp_137_var = _tmp_137_rule(p)) // ')' | ',' (')' | '**')
)
{
D(fprintf(stderr, "%*c+ invalid_star_etc[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'*' (')' | ',' (')' | '**'))"));
@@ -15364,11 +15323,11 @@ invalid_lambda_star_etc_rule(Parser *p)
}
D(fprintf(stderr, "%*c> invalid_lambda_star_etc[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'*' (':' | ',' (':' | '**'))"));
Token * _literal;
- void *_tmp_137_var;
+ void *_tmp_138_var;
if (
(_literal = _PyPegen_expect_token(p, 16)) // token='*'
&&
- (_tmp_137_var = _tmp_137_rule(p)) // ':' | ',' (':' | '**')
+ (_tmp_138_var = _tmp_138_rule(p)) // ':' | ',' (':' | '**')
)
{
D(fprintf(stderr, "%*c+ invalid_lambda_star_etc[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'*' (':' | ',' (':' | '**'))"));
@@ -16877,12 +16836,12 @@ _loop1_22_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop1_22[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')"));
- void *_tmp_138_var;
+ void *_tmp_139_var;
while (
- (_tmp_138_var = _tmp_138_rule(p)) // star_targets '='
+ (_tmp_139_var = _tmp_139_rule(p)) // star_targets '='
)
{
- _res = _tmp_138_var;
+ _res = _tmp_139_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -17385,12 +17344,12 @@ _loop0_31_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop0_31[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('.' | '...')"));
- void *_tmp_139_var;
+ void *_tmp_140_var;
while (
- (_tmp_139_var = _tmp_139_rule(p)) // '.' | '...'
+ (_tmp_140_var = _tmp_140_rule(p)) // '.' | '...'
)
{
- _res = _tmp_139_var;
+ _res = _tmp_140_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -17451,12 +17410,12 @@ _loop1_32_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop1_32[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('.' | '...')"));
- void *_tmp_140_var;
+ void *_tmp_141_var;
while (
- (_tmp_140_var = _tmp_140_rule(p)) // '.' | '...'
+ (_tmp_141_var = _tmp_141_rule(p)) // '.' | '...'
)
{
- _res = _tmp_140_var;
+ _res = _tmp_141_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -19613,12 +19572,12 @@ _loop1_68_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop1_68[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('@' named_expression NEWLINE)"));
- void *_tmp_141_var;
+ void *_tmp_142_var;
while (
- (_tmp_141_var = _tmp_141_rule(p)) // '@' named_expression NEWLINE
+ (_tmp_142_var = _tmp_142_rule(p)) // '@' named_expression NEWLINE
)
{
- _res = _tmp_141_var;
+ _res = _tmp_142_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -19845,12 +19804,12 @@ _loop1_72_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop1_72[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_expression)"));
- void *_tmp_142_var;
+ void *_tmp_143_var;
while (
- (_tmp_142_var = _tmp_142_rule(p)) // ',' star_expression
+ (_tmp_143_var = _tmp_143_rule(p)) // ',' star_expression
)
{
- _res = _tmp_142_var;
+ _res = _tmp_143_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -20030,12 +19989,12 @@ _loop1_75_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop1_75[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' expression)"));
- void *_tmp_143_var;
+ void *_tmp_144_var;
while (
- (_tmp_143_var = _tmp_143_rule(p)) // ',' expression
+ (_tmp_144_var = _tmp_144_rule(p)) // ',' expression
)
{
- _res = _tmp_143_var;
+ _res = _tmp_144_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -21060,12 +21019,12 @@ _loop1_90_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop1_90[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('or' conjunction)"));
- void *_tmp_144_var;
+ void *_tmp_145_var;
while (
- (_tmp_144_var = _tmp_144_rule(p)) // 'or' conjunction
+ (_tmp_145_var = _tmp_145_rule(p)) // 'or' conjunction
)
{
- _res = _tmp_144_var;
+ _res = _tmp_145_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -21131,12 +21090,12 @@ _loop1_91_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop1_91[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('and' inversion)"));
- void *_tmp_145_var;
+ void *_tmp_146_var;
while (
- (_tmp_145_var = _tmp_145_rule(p)) // 'and' inversion
+ (_tmp_146_var = _tmp_146_rule(p)) // 'and' inversion
)
{
- _res = _tmp_145_var;
+ _res = _tmp_146_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -22052,12 +22011,12 @@ _loop0_106_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop0_106[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('if' disjunction)"));
- void *_tmp_146_var;
+ void *_tmp_147_var;
while (
- (_tmp_146_var = _tmp_146_rule(p)) // 'if' disjunction
+ (_tmp_147_var = _tmp_147_rule(p)) // 'if' disjunction
)
{
- _res = _tmp_146_var;
+ _res = _tmp_147_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -22118,12 +22077,12 @@ _loop0_107_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop0_107[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('if' disjunction)"));
- void *_tmp_147_var;
+ void *_tmp_148_var;
while (
- (_tmp_147_var = _tmp_147_rule(p)) // 'if' disjunction
+ (_tmp_148_var = _tmp_148_rule(p)) // 'if' disjunction
)
{
- _res = _tmp_147_var;
+ _res = _tmp_148_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -22157,43 +22116,113 @@ _loop0_107_rule(Parser *p)
return _seq;
}
-// _tmp_108: ',' args
-static void *
-_tmp_108_rule(Parser *p)
+// _loop0_109: ',' (starred_expression | named_expression !'=')
+static asdl_seq *
+_loop0_109_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
D(p->level--);
return NULL;
}
- void * _res = NULL;
+ void *_res = NULL;
int _mark = p->mark;
- { // ',' args
+ int _start_mark = p->mark;
+ void **_children = PyMem_Malloc(sizeof(void *));
+ if (!_children) {
+ p->error_indicator = 1;
+ PyErr_NoMemory();
+ D(p->level--);
+ return NULL;
+ }
+ ssize_t _children_capacity = 1;
+ ssize_t _n = 0;
+ { // ',' (starred_expression | named_expression !'=')
if (p->error_indicator) {
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_108[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' args"));
+ D(fprintf(stderr, "%*c> _loop0_109[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (starred_expression | named_expression !'=')"));
Token * _literal;
- expr_ty c;
- if (
+ void *elem;
+ while (
(_literal = _PyPegen_expect_token(p, 12)) // token=','
&&
- (c = args_rule(p)) // args
+ (elem = _tmp_149_rule(p)) // starred_expression | named_expression !'='
)
{
- D(fprintf(stderr, "%*c+ _tmp_108[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' args"));
- _res = c;
+ _res = elem;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
+ PyMem_Free(_children);
D(p->level--);
return NULL;
}
+ if (_n == _children_capacity) {
+ _children_capacity *= 2;
+ void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
+ if (!_new_children) {
+ p->error_indicator = 1;
+ PyErr_NoMemory();
+ D(p->level--);
+ return NULL;
+ }
+ _children = _new_children;
+ }
+ _children[_n++] = _res;
+ _mark = p->mark;
+ }
+ p->mark = _mark;
+ D(fprintf(stderr, "%*c%s _loop0_109[%d-%d]: %s failed!\n", p->level, ' ',
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (starred_expression | named_expression !'=')"));
+ }
+ asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena);
+ if (!_seq) {
+ PyMem_Free(_children);
+ p->error_indicator = 1;
+ PyErr_NoMemory();
+ D(p->level--);
+ return NULL;
+ }
+ for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]);
+ PyMem_Free(_children);
+ _PyPegen_insert_memo(p, _start_mark, _loop0_109_type, _seq);
+ D(p->level--);
+ return _seq;
+}
+
+// _gather_108: (starred_expression | named_expression !'=') _loop0_109
+static asdl_seq *
+_gather_108_rule(Parser *p)
+{
+ D(p->level++);
+ if (p->error_indicator) {
+ D(p->level--);
+ return NULL;
+ }
+ asdl_seq * _res = NULL;
+ int _mark = p->mark;
+ { // (starred_expression | named_expression !'=') _loop0_109
+ if (p->error_indicator) {
+ D(p->level--);
+ return NULL;
+ }
+ D(fprintf(stderr, "%*c> _gather_108[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(starred_expression | named_expression !'=') _loop0_109"));
+ void *elem;
+ asdl_seq * seq;
+ if (
+ (elem = _tmp_149_rule(p)) // starred_expression | named_expression !'='
+ &&
+ (seq = _loop0_109_rule(p)) // _loop0_109
+ )
+ {
+ D(fprintf(stderr, "%*c+ _gather_108[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "(starred_expression | named_expression !'=') _loop0_109"));
+ _res = _PyPegen_seq_insert_in_front(p, elem, seq);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_108[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' args"));
+ D(fprintf(stderr, "%*c%s _gather_108[%d-%d]: %s failed!\n", p->level, ' ',
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(starred_expression | named_expression !'=') _loop0_109"));
}
_res = NULL;
done:
@@ -22201,9 +22230,9 @@ _tmp_108_rule(Parser *p)
return _res;
}
-// _tmp_109: ',' args
+// _tmp_110: ',' kwargs
static void *
-_tmp_109_rule(Parser *p)
+_tmp_110_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -22212,22 +22241,22 @@ _tmp_109_rule(Parser *p)
}
void * _res = NULL;
int _mark = p->mark;
- { // ',' args
+ { // ',' kwargs
if (p->error_indicator) {
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_109[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' args"));
+ D(fprintf(stderr, "%*c> _tmp_110[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' kwargs"));
Token * _literal;
- expr_ty c;
+ asdl_seq* k;
if (
(_literal = _PyPegen_expect_token(p, 12)) // token=','
&&
- (c = args_rule(p)) // args
+ (k = kwargs_rule(p)) // kwargs
)
{
- D(fprintf(stderr, "%*c+ _tmp_109[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' args"));
- _res = c;
+ D(fprintf(stderr, "%*c+ _tmp_110[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' kwargs"));
+ _res = k;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
D(p->level--);
@@ -22236,8 +22265,8 @@ _tmp_109_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_109[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' args"));
+ D(fprintf(stderr, "%*c%s _tmp_110[%d-%d]: %s failed!\n", p->level, ' ',
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' kwargs"));
}
_res = NULL;
done:
@@ -22245,9 +22274,9 @@ _tmp_109_rule(Parser *p)
return _res;
}
-// _loop0_111: ',' kwarg_or_starred
+// _loop0_112: ',' kwarg_or_starred
static asdl_seq *
-_loop0_111_rule(Parser *p)
+_loop0_112_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -22271,7 +22300,7 @@ _loop0_111_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _loop0_111[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' kwarg_or_starred"));
+ D(fprintf(stderr, "%*c> _loop0_112[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' kwarg_or_starred"));
Token * _literal;
KeywordOrStarred* elem;
while (
@@ -22302,7 +22331,7 @@ _loop0_111_rule(Parser *p)
_mark = p->mark;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _loop0_111[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _loop0_112[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' kwarg_or_starred"));
}
asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena);
@@ -22315,14 +22344,14 @@ _loop0_111_rule(Parser *p)
}
for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]);
PyMem_Free(_children);
- _PyPegen_insert_memo(p, _start_mark, _loop0_111_type, _seq);
+ _PyPegen_insert_memo(p, _start_mark, _loop0_112_type, _seq);
D(p->level--);
return _seq;
}
-// _gather_110: kwarg_or_starred _loop0_111
+// _gather_111: kwarg_or_starred _loop0_112
static asdl_seq *
-_gather_110_rule(Parser *p)
+_gather_111_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -22331,27 +22360,27 @@ _gather_110_rule(Parser *p)
}
asdl_seq * _res = NULL;
int _mark = p->mark;
- { // kwarg_or_starred _loop0_111
+ { // kwarg_or_starred _loop0_112
if (p->error_indicator) {
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _gather_110[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "kwarg_or_starred _loop0_111"));
+ D(fprintf(stderr, "%*c> _gather_111[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "kwarg_or_starred _loop0_112"));
KeywordOrStarred* elem;
asdl_seq * seq;
if (
(elem = kwarg_or_starred_rule(p)) // kwarg_or_starred
&&
- (seq = _loop0_111_rule(p)) // _loop0_111
+ (seq = _loop0_112_rule(p)) // _loop0_112
)
{
- D(fprintf(stderr, "%*c+ _gather_110[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "kwarg_or_starred _loop0_111"));
+ D(fprintf(stderr, "%*c+ _gather_111[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "kwarg_or_starred _loop0_112"));
_res = _PyPegen_seq_insert_in_front(p, elem, seq);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _gather_110[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "kwarg_or_starred _loop0_111"));
+ D(fprintf(stderr, "%*c%s _gather_111[%d-%d]: %s failed!\n", p->level, ' ',
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "kwarg_or_starred _loop0_112"));
}
_res = NULL;
done:
@@ -22359,9 +22388,9 @@ _gather_110_rule(Parser *p)
return _res;
}
-// _loop0_113: ',' kwarg_or_double_starred
+// _loop0_114: ',' kwarg_or_double_starred
static asdl_seq *
-_loop0_113_rule(Parser *p)
+_loop0_114_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -22385,7 +22414,7 @@ _loop0_113_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _loop0_113[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' kwarg_or_double_starred"));
+ D(fprintf(stderr, "%*c> _loop0_114[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' kwarg_or_double_starred"));
Token * _literal;
KeywordOrStarred* elem;
while (
@@ -22416,7 +22445,7 @@ _loop0_113_rule(Parser *p)
_mark = p->mark;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _loop0_113[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _loop0_114[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' kwarg_or_double_starred"));
}
asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena);
@@ -22429,14 +22458,14 @@ _loop0_113_rule(Parser *p)
}
for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]);
PyMem_Free(_children);
- _PyPegen_insert_memo(p, _start_mark, _loop0_113_type, _seq);
+ _PyPegen_insert_memo(p, _start_mark, _loop0_114_type, _seq);
D(p->level--);
return _seq;
}
-// _gather_112: kwarg_or_double_starred _loop0_113
+// _gather_113: kwarg_or_double_starred _loop0_114
static asdl_seq *
-_gather_112_rule(Parser *p)
+_gather_113_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -22445,27 +22474,27 @@ _gather_112_rule(Parser *p)
}
asdl_seq * _res = NULL;
int _mark = p->mark;
- { // kwarg_or_double_starred _loop0_113
+ { // kwarg_or_double_starred _loop0_114
if (p->error_indicator) {
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _gather_112[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "kwarg_or_double_starred _loop0_113"));
+ D(fprintf(stderr, "%*c> _gather_113[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "kwarg_or_double_starred _loop0_114"));
KeywordOrStarred* elem;
asdl_seq * seq;
if (
(elem = kwarg_or_double_starred_rule(p)) // kwarg_or_double_starred
&&
- (seq = _loop0_113_rule(p)) // _loop0_113
+ (seq = _loop0_114_rule(p)) // _loop0_114
)
{
- D(fprintf(stderr, "%*c+ _gather_112[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "kwarg_or_double_starred _loop0_113"));
+ D(fprintf(stderr, "%*c+ _gather_113[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "kwarg_or_double_starred _loop0_114"));
_res = _PyPegen_seq_insert_in_front(p, elem, seq);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _gather_112[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "kwarg_or_double_starred _loop0_113"));
+ D(fprintf(stderr, "%*c%s _gather_113[%d-%d]: %s failed!\n", p->level, ' ',
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "kwarg_or_double_starred _loop0_114"));
}
_res = NULL;
done:
@@ -22473,9 +22502,9 @@ _gather_112_rule(Parser *p)
return _res;
}
-// _loop0_115: ',' kwarg_or_starred
+// _loop0_116: ',' kwarg_or_starred
static asdl_seq *
-_loop0_115_rule(Parser *p)
+_loop0_116_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -22499,7 +22528,7 @@ _loop0_115_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _loop0_115[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' kwarg_or_starred"));
+ D(fprintf(stderr, "%*c> _loop0_116[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' kwarg_or_starred"));
Token * _literal;
KeywordOrStarred* elem;
while (
@@ -22530,7 +22559,7 @@ _loop0_115_rule(Parser *p)
_mark = p->mark;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _loop0_115[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _loop0_116[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' kwarg_or_starred"));
}
asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena);
@@ -22543,14 +22572,14 @@ _loop0_115_rule(Parser *p)
}
for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]);
PyMem_Free(_children);
- _PyPegen_insert_memo(p, _start_mark, _loop0_115_type, _seq);
+ _PyPegen_insert_memo(p, _start_mark, _loop0_116_type, _seq);
D(p->level--);
return _seq;
}
-// _gather_114: kwarg_or_starred _loop0_115
+// _gather_115: kwarg_or_starred _loop0_116
static asdl_seq *
-_gather_114_rule(Parser *p)
+_gather_115_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -22559,27 +22588,27 @@ _gather_114_rule(Parser *p)
}
asdl_seq * _res = NULL;
int _mark = p->mark;
- { // kwarg_or_starred _loop0_115
+ { // kwarg_or_starred _loop0_116
if (p->error_indicator) {
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _gather_114[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "kwarg_or_starred _loop0_115"));
+ D(fprintf(stderr, "%*c> _gather_115[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "kwarg_or_starred _loop0_116"));
KeywordOrStarred* elem;
asdl_seq * seq;
if (
(elem = kwarg_or_starred_rule(p)) // kwarg_or_starred
&&
- (seq = _loop0_115_rule(p)) // _loop0_115
+ (seq = _loop0_116_rule(p)) // _loop0_116
)
{
- D(fprintf(stderr, "%*c+ _gather_114[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "kwarg_or_starred _loop0_115"));
+ D(fprintf(stderr, "%*c+ _gather_115[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "kwarg_or_starred _loop0_116"));
_res = _PyPegen_seq_insert_in_front(p, elem, seq);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _gather_114[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "kwarg_or_starred _loop0_115"));
+ D(fprintf(stderr, "%*c%s _gather_115[%d-%d]: %s failed!\n", p->level, ' ',
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "kwarg_or_starred _loop0_116"));
}
_res = NULL;
done:
@@ -22587,9 +22616,9 @@ _gather_114_rule(Parser *p)
return _res;
}
-// _loop0_117: ',' kwarg_or_double_starred
+// _loop0_118: ',' kwarg_or_double_starred
static asdl_seq *
-_loop0_117_rule(Parser *p)
+_loop0_118_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -22613,7 +22642,7 @@ _loop0_117_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _loop0_117[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' kwarg_or_double_starred"));
+ D(fprintf(stderr, "%*c> _loop0_118[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' kwarg_or_double_starred"));
Token * _literal;
KeywordOrStarred* elem;
while (
@@ -22644,7 +22673,7 @@ _loop0_117_rule(Parser *p)
_mark = p->mark;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _loop0_117[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _loop0_118[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' kwarg_or_double_starred"));
}
asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena);
@@ -22657,14 +22686,14 @@ _loop0_117_rule(Parser *p)
}
for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]);
PyMem_Free(_children);
- _PyPegen_insert_memo(p, _start_mark, _loop0_117_type, _seq);
+ _PyPegen_insert_memo(p, _start_mark, _loop0_118_type, _seq);
D(p->level--);
return _seq;
}
-// _gather_116: kwarg_or_double_starred _loop0_117
+// _gather_117: kwarg_or_double_starred _loop0_118
static asdl_seq *
-_gather_116_rule(Parser *p)
+_gather_117_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -22673,27 +22702,27 @@ _gather_116_rule(Parser *p)
}
asdl_seq * _res = NULL;
int _mark = p->mark;
- { // kwarg_or_double_starred _loop0_117
+ { // kwarg_or_double_starred _loop0_118
if (p->error_indicator) {
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _gather_116[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "kwarg_or_double_starred _loop0_117"));
+ D(fprintf(stderr, "%*c> _gather_117[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "kwarg_or_double_starred _loop0_118"));
KeywordOrStarred* elem;
asdl_seq * seq;
if (
(elem = kwarg_or_double_starred_rule(p)) // kwarg_or_double_starred
&&
- (seq = _loop0_117_rule(p)) // _loop0_117
+ (seq = _loop0_118_rule(p)) // _loop0_118
)
{
- D(fprintf(stderr, "%*c+ _gather_116[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "kwarg_or_double_starred _loop0_117"));
+ D(fprintf(stderr, "%*c+ _gather_117[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "kwarg_or_double_starred _loop0_118"));
_res = _PyPegen_seq_insert_in_front(p, elem, seq);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _gather_116[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "kwarg_or_double_starred _loop0_117"));
+ D(fprintf(stderr, "%*c%s _gather_117[%d-%d]: %s failed!\n", p->level, ' ',
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "kwarg_or_double_starred _loop0_118"));
}
_res = NULL;
done:
@@ -22701,9 +22730,9 @@ _gather_116_rule(Parser *p)
return _res;
}
-// _loop0_118: (',' star_target)
+// _loop0_119: (',' star_target)
static asdl_seq *
-_loop0_118_rule(Parser *p)
+_loop0_119_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -22727,13 +22756,13 @@ _loop0_118_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _loop0_118[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_target)"));
- void *_tmp_148_var;
+ D(fprintf(stderr, "%*c> _loop0_119[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_target)"));
+ void *_tmp_150_var;
while (
- (_tmp_148_var = _tmp_148_rule(p)) // ',' star_target
+ (_tmp_150_var = _tmp_150_rule(p)) // ',' star_target
)
{
- _res = _tmp_148_var;
+ _res = _tmp_150_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -22749,7 +22778,7 @@ _loop0_118_rule(Parser *p)
_mark = p->mark;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _loop0_118[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _loop0_119[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(',' star_target)"));
}
asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena);
@@ -22762,14 +22791,14 @@ _loop0_118_rule(Parser *p)
}
for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]);
PyMem_Free(_children);
- _PyPegen_insert_memo(p, _start_mark, _loop0_118_type, _seq);
+ _PyPegen_insert_memo(p, _start_mark, _loop0_119_type, _seq);
D(p->level--);
return _seq;
}
-// _loop0_120: ',' star_target
+// _loop0_121: ',' star_target
static asdl_seq *
-_loop0_120_rule(Parser *p)
+_loop0_121_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -22793,7 +22822,7 @@ _loop0_120_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _loop0_120[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target"));
+ D(fprintf(stderr, "%*c> _loop0_121[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target"));
Token * _literal;
expr_ty elem;
while (
@@ -22824,7 +22853,7 @@ _loop0_120_rule(Parser *p)
_mark = p->mark;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _loop0_120[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _loop0_121[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_target"));
}
asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena);
@@ -22837,14 +22866,14 @@ _loop0_120_rule(Parser *p)
}
for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]);
PyMem_Free(_children);
- _PyPegen_insert_memo(p, _start_mark, _loop0_120_type, _seq);
+ _PyPegen_insert_memo(p, _start_mark, _loop0_121_type, _seq);
D(p->level--);
return _seq;
}
-// _gather_119: star_target _loop0_120
+// _gather_120: star_target _loop0_121
static asdl_seq *
-_gather_119_rule(Parser *p)
+_gather_120_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -22853,27 +22882,27 @@ _gather_119_rule(Parser *p)
}
asdl_seq * _res = NULL;
int _mark = p->mark;
- { // star_target _loop0_120
+ { // star_target _loop0_121
if (p->error_indicator) {
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _gather_119[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_target _loop0_120"));
+ D(fprintf(stderr, "%*c> _gather_120[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_target _loop0_121"));
expr_ty elem;
asdl_seq * seq;
if (
(elem = star_target_rule(p)) // star_target
&&
- (seq = _loop0_120_rule(p)) // _loop0_120
+ (seq = _loop0_121_rule(p)) // _loop0_121
)
{
- D(fprintf(stderr, "%*c+ _gather_119[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_target _loop0_120"));
+ D(fprintf(stderr, "%*c+ _gather_120[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_target _loop0_121"));
_res = _PyPegen_seq_insert_in_front(p, elem, seq);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _gather_119[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_target _loop0_120"));
+ D(fprintf(stderr, "%*c%s _gather_120[%d-%d]: %s failed!\n", p->level, ' ',
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_target _loop0_121"));
}
_res = NULL;
done:
@@ -22881,9 +22910,9 @@ _gather_119_rule(Parser *p)
return _res;
}
-// _tmp_121: !'*' star_target
+// _tmp_122: !'*' star_target
static void *
-_tmp_121_rule(Parser *p)
+_tmp_122_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -22897,7 +22926,7 @@ _tmp_121_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_121[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "!'*' star_target"));
+ D(fprintf(stderr, "%*c> _tmp_122[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "!'*' star_target"));
expr_ty star_target_var;
if (
_PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 16) // token='*'
@@ -22905,12 +22934,12 @@ _tmp_121_rule(Parser *p)
(star_target_var = star_target_rule(p)) // star_target
)
{
- D(fprintf(stderr, "%*c+ _tmp_121[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "!'*' star_target"));
+ D(fprintf(stderr, "%*c+ _tmp_122[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "!'*' star_target"));
_res = star_target_var;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_121[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_122[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "!'*' star_target"));
}
_res = NULL;
@@ -22919,9 +22948,9 @@ _tmp_121_rule(Parser *p)
return _res;
}
-// _loop0_123: ',' del_target
+// _loop0_124: ',' del_target
static asdl_seq *
-_loop0_123_rule(Parser *p)
+_loop0_124_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -22945,7 +22974,7 @@ _loop0_123_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _loop0_123[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' del_target"));
+ D(fprintf(stderr, "%*c> _loop0_124[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' del_target"));
Token * _literal;
expr_ty elem;
while (
@@ -22976,7 +23005,7 @@ _loop0_123_rule(Parser *p)
_mark = p->mark;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _loop0_123[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _loop0_124[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' del_target"));
}
asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena);
@@ -22989,14 +23018,14 @@ _loop0_123_rule(Parser *p)
}
for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]);
PyMem_Free(_children);
- _PyPegen_insert_memo(p, _start_mark, _loop0_123_type, _seq);
+ _PyPegen_insert_memo(p, _start_mark, _loop0_124_type, _seq);
D(p->level--);
return _seq;
}
-// _gather_122: del_target _loop0_123
+// _gather_123: del_target _loop0_124
static asdl_seq *
-_gather_122_rule(Parser *p)
+_gather_123_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23005,27 +23034,27 @@ _gather_122_rule(Parser *p)
}
asdl_seq * _res = NULL;
int _mark = p->mark;
- { // del_target _loop0_123
+ { // del_target _loop0_124
if (p->error_indicator) {
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _gather_122[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "del_target _loop0_123"));
+ D(fprintf(stderr, "%*c> _gather_123[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "del_target _loop0_124"));
expr_ty elem;
asdl_seq * seq;
if (
(elem = del_target_rule(p)) // del_target
&&
- (seq = _loop0_123_rule(p)) // _loop0_123
+ (seq = _loop0_124_rule(p)) // _loop0_124
)
{
- D(fprintf(stderr, "%*c+ _gather_122[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "del_target _loop0_123"));
+ D(fprintf(stderr, "%*c+ _gather_123[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "del_target _loop0_124"));
_res = _PyPegen_seq_insert_in_front(p, elem, seq);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _gather_122[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "del_target _loop0_123"));
+ D(fprintf(stderr, "%*c%s _gather_123[%d-%d]: %s failed!\n", p->level, ' ',
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "del_target _loop0_124"));
}
_res = NULL;
done:
@@ -23033,9 +23062,9 @@ _gather_122_rule(Parser *p)
return _res;
}
-// _loop0_125: ',' target
+// _loop0_126: ',' target
static asdl_seq *
-_loop0_125_rule(Parser *p)
+_loop0_126_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23059,7 +23088,7 @@ _loop0_125_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _loop0_125[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' target"));
+ D(fprintf(stderr, "%*c> _loop0_126[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' target"));
Token * _literal;
expr_ty elem;
while (
@@ -23090,7 +23119,7 @@ _loop0_125_rule(Parser *p)
_mark = p->mark;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _loop0_125[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _loop0_126[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' target"));
}
asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena);
@@ -23103,14 +23132,14 @@ _loop0_125_rule(Parser *p)
}
for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]);
PyMem_Free(_children);
- _PyPegen_insert_memo(p, _start_mark, _loop0_125_type, _seq);
+ _PyPegen_insert_memo(p, _start_mark, _loop0_126_type, _seq);
D(p->level--);
return _seq;
}
-// _gather_124: target _loop0_125
+// _gather_125: target _loop0_126
static asdl_seq *
-_gather_124_rule(Parser *p)
+_gather_125_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23119,27 +23148,27 @@ _gather_124_rule(Parser *p)
}
asdl_seq * _res = NULL;
int _mark = p->mark;
- { // target _loop0_125
+ { // target _loop0_126
if (p->error_indicator) {
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _gather_124[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "target _loop0_125"));
+ D(fprintf(stderr, "%*c> _gather_125[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "target _loop0_126"));
expr_ty elem;
asdl_seq * seq;
if (
(elem = target_rule(p)) // target
&&
- (seq = _loop0_125_rule(p)) // _loop0_125
+ (seq = _loop0_126_rule(p)) // _loop0_126
)
{
- D(fprintf(stderr, "%*c+ _gather_124[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "target _loop0_125"));
+ D(fprintf(stderr, "%*c+ _gather_125[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "target _loop0_126"));
_res = _PyPegen_seq_insert_in_front(p, elem, seq);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _gather_124[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "target _loop0_125"));
+ D(fprintf(stderr, "%*c%s _gather_125[%d-%d]: %s failed!\n", p->level, ' ',
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "target _loop0_126"));
}
_res = NULL;
done:
@@ -23147,9 +23176,9 @@ _gather_124_rule(Parser *p)
return _res;
}
-// _tmp_126: args | expression for_if_clauses
+// _tmp_127: args | expression for_if_clauses
static void *
-_tmp_126_rule(Parser *p)
+_tmp_127_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23163,18 +23192,18 @@ _tmp_126_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_126[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "args"));
+ D(fprintf(stderr, "%*c> _tmp_127[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "args"));
expr_ty args_var;
if (
(args_var = args_rule(p)) // args
)
{
- D(fprintf(stderr, "%*c+ _tmp_126[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "args"));
+ D(fprintf(stderr, "%*c+ _tmp_127[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "args"));
_res = args_var;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_126[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_127[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "args"));
}
{ // expression for_if_clauses
@@ -23182,7 +23211,7 @@ _tmp_126_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_126[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression for_if_clauses"));
+ D(fprintf(stderr, "%*c> _tmp_127[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression for_if_clauses"));
expr_ty expression_var;
asdl_seq* for_if_clauses_var;
if (
@@ -23191,12 +23220,12 @@ _tmp_126_rule(Parser *p)
(for_if_clauses_var = for_if_clauses_rule(p)) // for_if_clauses
)
{
- D(fprintf(stderr, "%*c+ _tmp_126[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression for_if_clauses"));
+ D(fprintf(stderr, "%*c+ _tmp_127[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression for_if_clauses"));
_res = _PyPegen_dummy_name(p, expression_var, for_if_clauses_var);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_126[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_127[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression for_if_clauses"));
}
_res = NULL;
@@ -23205,9 +23234,9 @@ _tmp_126_rule(Parser *p)
return _res;
}
-// _loop0_127: star_named_expressions
+// _loop0_128: star_named_expressions
static asdl_seq *
-_loop0_127_rule(Parser *p)
+_loop0_128_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23231,7 +23260,7 @@ _loop0_127_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _loop0_127[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_named_expressions"));
+ D(fprintf(stderr, "%*c> _loop0_128[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_named_expressions"));
asdl_seq* star_named_expressions_var;
while (
(star_named_expressions_var = star_named_expressions_rule(p)) // star_named_expressions
@@ -23253,7 +23282,7 @@ _loop0_127_rule(Parser *p)
_mark = p->mark;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _loop0_127[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _loop0_128[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_named_expressions"));
}
asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena);
@@ -23266,14 +23295,14 @@ _loop0_127_rule(Parser *p)
}
for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]);
PyMem_Free(_children);
- _PyPegen_insert_memo(p, _start_mark, _loop0_127_type, _seq);
+ _PyPegen_insert_memo(p, _start_mark, _loop0_128_type, _seq);
D(p->level--);
return _seq;
}
-// _loop0_128: (star_targets '=')
+// _loop0_129: (star_targets '=')
static asdl_seq *
-_loop0_128_rule(Parser *p)
+_loop0_129_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23297,13 +23326,13 @@ _loop0_128_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _loop0_128[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')"));
- void *_tmp_149_var;
+ D(fprintf(stderr, "%*c> _loop0_129[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')"));
+ void *_tmp_151_var;
while (
- (_tmp_149_var = _tmp_149_rule(p)) // star_targets '='
+ (_tmp_151_var = _tmp_151_rule(p)) // star_targets '='
)
{
- _res = _tmp_149_var;
+ _res = _tmp_151_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -23319,7 +23348,7 @@ _loop0_128_rule(Parser *p)
_mark = p->mark;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _loop0_128[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _loop0_129[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(star_targets '=')"));
}
asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena);
@@ -23332,14 +23361,14 @@ _loop0_128_rule(Parser *p)
}
for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]);
PyMem_Free(_children);
- _PyPegen_insert_memo(p, _start_mark, _loop0_128_type, _seq);
+ _PyPegen_insert_memo(p, _start_mark, _loop0_129_type, _seq);
D(p->level--);
return _seq;
}
-// _loop0_129: (star_targets '=')
+// _loop0_130: (star_targets '=')
static asdl_seq *
-_loop0_129_rule(Parser *p)
+_loop0_130_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23363,13 +23392,13 @@ _loop0_129_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _loop0_129[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')"));
- void *_tmp_150_var;
+ D(fprintf(stderr, "%*c> _loop0_130[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')"));
+ void *_tmp_152_var;
while (
- (_tmp_150_var = _tmp_150_rule(p)) // star_targets '='
+ (_tmp_152_var = _tmp_152_rule(p)) // star_targets '='
)
{
- _res = _tmp_150_var;
+ _res = _tmp_152_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -23385,7 +23414,7 @@ _loop0_129_rule(Parser *p)
_mark = p->mark;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _loop0_129[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _loop0_130[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(star_targets '=')"));
}
asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena);
@@ -23398,14 +23427,14 @@ _loop0_129_rule(Parser *p)
}
for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]);
PyMem_Free(_children);
- _PyPegen_insert_memo(p, _start_mark, _loop0_129_type, _seq);
+ _PyPegen_insert_memo(p, _start_mark, _loop0_130_type, _seq);
D(p->level--);
return _seq;
}
-// _tmp_130: yield_expr | star_expressions
+// _tmp_131: yield_expr | star_expressions
static void *
-_tmp_130_rule(Parser *p)
+_tmp_131_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23419,18 +23448,18 @@ _tmp_130_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_130[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "yield_expr"));
+ D(fprintf(stderr, "%*c> _tmp_131[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "yield_expr"));
expr_ty yield_expr_var;
if (
(yield_expr_var = yield_expr_rule(p)) // yield_expr
)
{
- D(fprintf(stderr, "%*c+ _tmp_130[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "yield_expr"));
+ D(fprintf(stderr, "%*c+ _tmp_131[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "yield_expr"));
_res = yield_expr_var;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_130[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_131[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "yield_expr"));
}
{ // star_expressions
@@ -23438,18 +23467,18 @@ _tmp_130_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_130[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions"));
+ D(fprintf(stderr, "%*c> _tmp_131[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_expressions"));
expr_ty star_expressions_var;
if (
(star_expressions_var = star_expressions_rule(p)) // star_expressions
)
{
- D(fprintf(stderr, "%*c+ _tmp_130[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions"));
+ D(fprintf(stderr, "%*c+ _tmp_131[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_expressions"));
_res = star_expressions_var;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_130[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_131[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_expressions"));
}
_res = NULL;
@@ -23458,9 +23487,9 @@ _tmp_130_rule(Parser *p)
return _res;
}
-// _tmp_131: '[' | '(' | '{'
+// _tmp_132: '[' | '(' | '{'
static void *
-_tmp_131_rule(Parser *p)
+_tmp_132_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23474,18 +23503,18 @@ _tmp_131_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_131[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'['"));
+ D(fprintf(stderr, "%*c> _tmp_132[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'['"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 9)) // token='['
)
{
- D(fprintf(stderr, "%*c+ _tmp_131[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'['"));
+ D(fprintf(stderr, "%*c+ _tmp_132[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'['"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_131[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_132[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'['"));
}
{ // '('
@@ -23493,18 +23522,18 @@ _tmp_131_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_131[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'('"));
+ D(fprintf(stderr, "%*c> _tmp_132[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'('"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 7)) // token='('
)
{
- D(fprintf(stderr, "%*c+ _tmp_131[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'('"));
+ D(fprintf(stderr, "%*c+ _tmp_132[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'('"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_131[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_132[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'('"));
}
{ // '{'
@@ -23512,18 +23541,18 @@ _tmp_131_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_131[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{'"));
+ D(fprintf(stderr, "%*c> _tmp_132[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'{'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 25)) // token='{'
)
{
- D(fprintf(stderr, "%*c+ _tmp_131[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{'"));
+ D(fprintf(stderr, "%*c+ _tmp_132[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'{'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_131[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_132[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'{'"));
}
_res = NULL;
@@ -23532,9 +23561,9 @@ _tmp_131_rule(Parser *p)
return _res;
}
-// _loop0_132: param_no_default
+// _loop0_133: param_no_default
static asdl_seq *
-_loop0_132_rule(Parser *p)
+_loop0_133_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23558,7 +23587,7 @@ _loop0_132_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _loop0_132[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default"));
+ D(fprintf(stderr, "%*c> _loop0_133[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_no_default"));
arg_ty param_no_default_var;
while (
(param_no_default_var = param_no_default_rule(p)) // param_no_default
@@ -23580,7 +23609,7 @@ _loop0_132_rule(Parser *p)
_mark = p->mark;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _loop0_132[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _loop0_133[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_no_default"));
}
asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena);
@@ -23593,14 +23622,14 @@ _loop0_132_rule(Parser *p)
}
for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]);
PyMem_Free(_children);
- _PyPegen_insert_memo(p, _start_mark, _loop0_132_type, _seq);
+ _PyPegen_insert_memo(p, _start_mark, _loop0_133_type, _seq);
D(p->level--);
return _seq;
}
-// _tmp_133: slash_with_default | param_with_default+
+// _tmp_134: slash_with_default | param_with_default+
static void *
-_tmp_133_rule(Parser *p)
+_tmp_134_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23614,18 +23643,18 @@ _tmp_133_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_133[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "slash_with_default"));
+ D(fprintf(stderr, "%*c> _tmp_134[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "slash_with_default"));
SlashWithDefault* slash_with_default_var;
if (
(slash_with_default_var = slash_with_default_rule(p)) // slash_with_default
)
{
- D(fprintf(stderr, "%*c+ _tmp_133[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "slash_with_default"));
+ D(fprintf(stderr, "%*c+ _tmp_134[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "slash_with_default"));
_res = slash_with_default_var;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_133[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_134[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "slash_with_default"));
}
{ // param_with_default+
@@ -23633,18 +23662,18 @@ _tmp_133_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_133[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default+"));
- asdl_seq * _loop1_151_var;
+ D(fprintf(stderr, "%*c> _tmp_134[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default+"));
+ asdl_seq * _loop1_153_var;
if (
- (_loop1_151_var = _loop1_151_rule(p)) // param_with_default+
+ (_loop1_153_var = _loop1_153_rule(p)) // param_with_default+
)
{
- D(fprintf(stderr, "%*c+ _tmp_133[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "param_with_default+"));
- _res = _loop1_151_var;
+ D(fprintf(stderr, "%*c+ _tmp_134[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "param_with_default+"));
+ _res = _loop1_153_var;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_133[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_134[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_with_default+"));
}
_res = NULL;
@@ -23653,9 +23682,9 @@ _tmp_133_rule(Parser *p)
return _res;
}
-// _loop0_134: lambda_param_no_default
+// _loop0_135: lambda_param_no_default
static asdl_seq *
-_loop0_134_rule(Parser *p)
+_loop0_135_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23679,7 +23708,7 @@ _loop0_134_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _loop0_134[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default"));
+ D(fprintf(stderr, "%*c> _loop0_135[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_no_default"));
arg_ty lambda_param_no_default_var;
while (
(lambda_param_no_default_var = lambda_param_no_default_rule(p)) // lambda_param_no_default
@@ -23701,7 +23730,7 @@ _loop0_134_rule(Parser *p)
_mark = p->mark;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _loop0_134[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _loop0_135[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_no_default"));
}
asdl_seq *_seq = _Py_asdl_seq_new(_n, p->arena);
@@ -23714,14 +23743,14 @@ _loop0_134_rule(Parser *p)
}
for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]);
PyMem_Free(_children);
- _PyPegen_insert_memo(p, _start_mark, _loop0_134_type, _seq);
+ _PyPegen_insert_memo(p, _start_mark, _loop0_135_type, _seq);
D(p->level--);
return _seq;
}
-// _tmp_135: lambda_slash_with_default | lambda_param_with_default+
+// _tmp_136: lambda_slash_with_default | lambda_param_with_default+
static void *
-_tmp_135_rule(Parser *p)
+_tmp_136_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23735,18 +23764,18 @@ _tmp_135_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_135[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_slash_with_default"));
+ D(fprintf(stderr, "%*c> _tmp_136[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_slash_with_default"));
SlashWithDefault* lambda_slash_with_default_var;
if (
(lambda_slash_with_default_var = lambda_slash_with_default_rule(p)) // lambda_slash_with_default
)
{
- D(fprintf(stderr, "%*c+ _tmp_135[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_slash_with_default"));
+ D(fprintf(stderr, "%*c+ _tmp_136[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_slash_with_default"));
_res = lambda_slash_with_default_var;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_135[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_136[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_slash_with_default"));
}
{ // lambda_param_with_default+
@@ -23754,18 +23783,18 @@ _tmp_135_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_135[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+"));
- asdl_seq * _loop1_152_var;
+ D(fprintf(stderr, "%*c> _tmp_136[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+"));
+ asdl_seq * _loop1_154_var;
if (
- (_loop1_152_var = _loop1_152_rule(p)) // lambda_param_with_default+
+ (_loop1_154_var = _loop1_154_rule(p)) // lambda_param_with_default+
)
{
- D(fprintf(stderr, "%*c+ _tmp_135[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+"));
- _res = _loop1_152_var;
+ D(fprintf(stderr, "%*c+ _tmp_136[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default+"));
+ _res = _loop1_154_var;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_135[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_136[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_with_default+"));
}
_res = NULL;
@@ -23774,9 +23803,9 @@ _tmp_135_rule(Parser *p)
return _res;
}
-// _tmp_136: ')' | ',' (')' | '**')
+// _tmp_137: ')' | ',' (')' | '**')
static void *
-_tmp_136_rule(Parser *p)
+_tmp_137_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23790,18 +23819,18 @@ _tmp_136_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_136[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'"));
+ D(fprintf(stderr, "%*c> _tmp_137[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 8)) // token=')'
)
{
- D(fprintf(stderr, "%*c+ _tmp_136[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'"));
+ D(fprintf(stderr, "%*c+ _tmp_137[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_136[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_137[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "')'"));
}
{ // ',' (')' | '**')
@@ -23809,21 +23838,21 @@ _tmp_136_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_136[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')"));
+ D(fprintf(stderr, "%*c> _tmp_137[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')"));
Token * _literal;
- void *_tmp_153_var;
+ void *_tmp_155_var;
if (
(_literal = _PyPegen_expect_token(p, 12)) // token=','
&&
- (_tmp_153_var = _tmp_153_rule(p)) // ')' | '**'
+ (_tmp_155_var = _tmp_155_rule(p)) // ')' | '**'
)
{
- D(fprintf(stderr, "%*c+ _tmp_136[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')"));
- _res = _PyPegen_dummy_name(p, _literal, _tmp_153_var);
+ D(fprintf(stderr, "%*c+ _tmp_137[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')"));
+ _res = _PyPegen_dummy_name(p, _literal, _tmp_155_var);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_136[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_137[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (')' | '**')"));
}
_res = NULL;
@@ -23832,9 +23861,9 @@ _tmp_136_rule(Parser *p)
return _res;
}
-// _tmp_137: ':' | ',' (':' | '**')
+// _tmp_138: ':' | ',' (':' | '**')
static void *
-_tmp_137_rule(Parser *p)
+_tmp_138_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23848,18 +23877,18 @@ _tmp_137_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_137[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'"));
+ D(fprintf(stderr, "%*c> _tmp_138[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 11)) // token=':'
)
{
- D(fprintf(stderr, "%*c+ _tmp_137[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'"));
+ D(fprintf(stderr, "%*c+ _tmp_138[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_137[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_138[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':'"));
}
{ // ',' (':' | '**')
@@ -23867,21 +23896,21 @@ _tmp_137_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_137[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')"));
+ D(fprintf(stderr, "%*c> _tmp_138[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')"));
Token * _literal;
- void *_tmp_154_var;
+ void *_tmp_156_var;
if (
(_literal = _PyPegen_expect_token(p, 12)) // token=','
&&
- (_tmp_154_var = _tmp_154_rule(p)) // ':' | '**'
+ (_tmp_156_var = _tmp_156_rule(p)) // ':' | '**'
)
{
- D(fprintf(stderr, "%*c+ _tmp_137[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')"));
- _res = _PyPegen_dummy_name(p, _literal, _tmp_154_var);
+ D(fprintf(stderr, "%*c+ _tmp_138[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')"));
+ _res = _PyPegen_dummy_name(p, _literal, _tmp_156_var);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_137[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_138[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' (':' | '**')"));
}
_res = NULL;
@@ -23890,9 +23919,9 @@ _tmp_137_rule(Parser *p)
return _res;
}
-// _tmp_138: star_targets '='
+// _tmp_139: star_targets '='
static void *
-_tmp_138_rule(Parser *p)
+_tmp_139_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23906,7 +23935,7 @@ _tmp_138_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_138[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
+ D(fprintf(stderr, "%*c> _tmp_139[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
Token * _literal;
expr_ty z;
if (
@@ -23915,7 +23944,7 @@ _tmp_138_rule(Parser *p)
(_literal = _PyPegen_expect_token(p, 22)) // token='='
)
{
- D(fprintf(stderr, "%*c+ _tmp_138[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
+ D(fprintf(stderr, "%*c+ _tmp_139[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
_res = z;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -23925,7 +23954,7 @@ _tmp_138_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_138[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_139[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='"));
}
_res = NULL;
@@ -23934,9 +23963,9 @@ _tmp_138_rule(Parser *p)
return _res;
}
-// _tmp_139: '.' | '...'
+// _tmp_140: '.' | '...'
static void *
-_tmp_139_rule(Parser *p)
+_tmp_140_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -23950,18 +23979,18 @@ _tmp_139_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_139[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'"));
+ D(fprintf(stderr, "%*c> _tmp_140[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 23)) // token='.'
)
{
- D(fprintf(stderr, "%*c+ _tmp_139[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'"));
+ D(fprintf(stderr, "%*c+ _tmp_140[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_139[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_140[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'.'"));
}
{ // '...'
@@ -23969,18 +23998,18 @@ _tmp_139_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_139[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'"));
+ D(fprintf(stderr, "%*c> _tmp_140[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 52)) // token='...'
)
{
- D(fprintf(stderr, "%*c+ _tmp_139[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'"));
+ D(fprintf(stderr, "%*c+ _tmp_140[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_139[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_140[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'...'"));
}
_res = NULL;
@@ -23989,9 +24018,9 @@ _tmp_139_rule(Parser *p)
return _res;
}
-// _tmp_140: '.' | '...'
+// _tmp_141: '.' | '...'
static void *
-_tmp_140_rule(Parser *p)
+_tmp_141_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -24005,18 +24034,18 @@ _tmp_140_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_140[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'"));
+ D(fprintf(stderr, "%*c> _tmp_141[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 23)) // token='.'
)
{
- D(fprintf(stderr, "%*c+ _tmp_140[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'"));
+ D(fprintf(stderr, "%*c+ _tmp_141[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_140[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_141[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'.'"));
}
{ // '...'
@@ -24024,18 +24053,18 @@ _tmp_140_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_140[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'"));
+ D(fprintf(stderr, "%*c> _tmp_141[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 52)) // token='...'
)
{
- D(fprintf(stderr, "%*c+ _tmp_140[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'"));
+ D(fprintf(stderr, "%*c+ _tmp_141[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_140[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_141[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'...'"));
}
_res = NULL;
@@ -24044,9 +24073,9 @@ _tmp_140_rule(Parser *p)
return _res;
}
-// _tmp_141: '@' named_expression NEWLINE
+// _tmp_142: '@' named_expression NEWLINE
static void *
-_tmp_141_rule(Parser *p)
+_tmp_142_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -24060,7 +24089,7 @@ _tmp_141_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_141[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE"));
+ D(fprintf(stderr, "%*c> _tmp_142[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE"));
Token * _literal;
expr_ty f;
Token * newline_var;
@@ -24072,7 +24101,7 @@ _tmp_141_rule(Parser *p)
(newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE'
)
{
- D(fprintf(stderr, "%*c+ _tmp_141[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE"));
+ D(fprintf(stderr, "%*c+ _tmp_142[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE"));
_res = f;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -24082,7 +24111,7 @@ _tmp_141_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_141[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_142[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'@' named_expression NEWLINE"));
}
_res = NULL;
@@ -24091,9 +24120,9 @@ _tmp_141_rule(Parser *p)
return _res;
}
-// _tmp_142: ',' star_expression
+// _tmp_143: ',' star_expression
static void *
-_tmp_142_rule(Parser *p)
+_tmp_143_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -24107,7 +24136,7 @@ _tmp_142_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_142[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_expression"));
+ D(fprintf(stderr, "%*c> _tmp_143[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_expression"));
Token * _literal;
expr_ty c;
if (
@@ -24116,7 +24145,7 @@ _tmp_142_rule(Parser *p)
(c = star_expression_rule(p)) // star_expression
)
{
- D(fprintf(stderr, "%*c+ _tmp_142[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_expression"));
+ D(fprintf(stderr, "%*c+ _tmp_143[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_expression"));
_res = c;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -24126,7 +24155,7 @@ _tmp_142_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_142[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_143[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_expression"));
}
_res = NULL;
@@ -24135,9 +24164,9 @@ _tmp_142_rule(Parser *p)
return _res;
}
-// _tmp_143: ',' expression
+// _tmp_144: ',' expression
static void *
-_tmp_143_rule(Parser *p)
+_tmp_144_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -24151,7 +24180,7 @@ _tmp_143_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_143[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' expression"));
+ D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' expression"));
Token * _literal;
expr_ty c;
if (
@@ -24160,7 +24189,7 @@ _tmp_143_rule(Parser *p)
(c = expression_rule(p)) // expression
)
{
- D(fprintf(stderr, "%*c+ _tmp_143[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' expression"));
+ D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' expression"));
_res = c;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -24170,7 +24199,7 @@ _tmp_143_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_143[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' expression"));
}
_res = NULL;
@@ -24179,9 +24208,9 @@ _tmp_143_rule(Parser *p)
return _res;
}
-// _tmp_144: 'or' conjunction
+// _tmp_145: 'or' conjunction
static void *
-_tmp_144_rule(Parser *p)
+_tmp_145_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -24195,7 +24224,7 @@ _tmp_144_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_144[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'or' conjunction"));
+ D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'or' conjunction"));
Token * _keyword;
expr_ty c;
if (
@@ -24204,7 +24233,7 @@ _tmp_144_rule(Parser *p)
(c = conjunction_rule(p)) // conjunction
)
{
- D(fprintf(stderr, "%*c+ _tmp_144[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'or' conjunction"));
+ D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'or' conjunction"));
_res = c;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -24214,7 +24243,7 @@ _tmp_144_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_144[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'or' conjunction"));
}
_res = NULL;
@@ -24223,9 +24252,9 @@ _tmp_144_rule(Parser *p)
return _res;
}
-// _tmp_145: 'and' inversion
+// _tmp_146: 'and' inversion
static void *
-_tmp_145_rule(Parser *p)
+_tmp_146_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -24239,7 +24268,7 @@ _tmp_145_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_145[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'and' inversion"));
+ D(fprintf(stderr, "%*c> _tmp_146[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'and' inversion"));
Token * _keyword;
expr_ty c;
if (
@@ -24248,7 +24277,7 @@ _tmp_145_rule(Parser *p)
(c = inversion_rule(p)) // inversion
)
{
- D(fprintf(stderr, "%*c+ _tmp_145[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'and' inversion"));
+ D(fprintf(stderr, "%*c+ _tmp_146[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'and' inversion"));
_res = c;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -24258,7 +24287,7 @@ _tmp_145_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_145[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_146[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'and' inversion"));
}
_res = NULL;
@@ -24267,9 +24296,9 @@ _tmp_145_rule(Parser *p)
return _res;
}
-// _tmp_146: 'if' disjunction
+// _tmp_147: 'if' disjunction
static void *
-_tmp_146_rule(Parser *p)
+_tmp_147_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -24283,7 +24312,7 @@ _tmp_146_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_146[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction"));
+ D(fprintf(stderr, "%*c> _tmp_147[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction"));
Token * _keyword;
expr_ty z;
if (
@@ -24292,7 +24321,7 @@ _tmp_146_rule(Parser *p)
(z = disjunction_rule(p)) // disjunction
)
{
- D(fprintf(stderr, "%*c+ _tmp_146[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction"));
+ D(fprintf(stderr, "%*c+ _tmp_147[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction"));
_res = z;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -24302,7 +24331,7 @@ _tmp_146_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_146[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_147[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' disjunction"));
}
_res = NULL;
@@ -24311,9 +24340,9 @@ _tmp_146_rule(Parser *p)
return _res;
}
-// _tmp_147: 'if' disjunction
+// _tmp_148: 'if' disjunction
static void *
-_tmp_147_rule(Parser *p)
+_tmp_148_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -24327,7 +24356,7 @@ _tmp_147_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_147[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction"));
+ D(fprintf(stderr, "%*c> _tmp_148[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction"));
Token * _keyword;
expr_ty z;
if (
@@ -24336,7 +24365,7 @@ _tmp_147_rule(Parser *p)
(z = disjunction_rule(p)) // disjunction
)
{
- D(fprintf(stderr, "%*c+ _tmp_147[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction"));
+ D(fprintf(stderr, "%*c+ _tmp_148[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction"));
_res = z;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -24346,7 +24375,7 @@ _tmp_147_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_147[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_148[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' disjunction"));
}
_res = NULL;
@@ -24355,9 +24384,66 @@ _tmp_147_rule(Parser *p)
return _res;
}
-// _tmp_148: ',' star_target
+// _tmp_149: starred_expression | named_expression !'='
static void *
-_tmp_148_rule(Parser *p)
+_tmp_149_rule(Parser *p)
+{
+ D(p->level++);
+ if (p->error_indicator) {
+ D(p->level--);
+ return NULL;
+ }
+ void * _res = NULL;
+ int _mark = p->mark;
+ { // starred_expression
+ if (p->error_indicator) {
+ D(p->level--);
+ return NULL;
+ }
+ D(fprintf(stderr, "%*c> _tmp_149[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "starred_expression"));
+ expr_ty starred_expression_var;
+ if (
+ (starred_expression_var = starred_expression_rule(p)) // starred_expression
+ )
+ {
+ D(fprintf(stderr, "%*c+ _tmp_149[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "starred_expression"));
+ _res = starred_expression_var;
+ goto done;
+ }
+ p->mark = _mark;
+ D(fprintf(stderr, "%*c%s _tmp_149[%d-%d]: %s failed!\n", p->level, ' ',
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "starred_expression"));
+ }
+ { // named_expression !'='
+ if (p->error_indicator) {
+ D(p->level--);
+ return NULL;
+ }
+ D(fprintf(stderr, "%*c> _tmp_149[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "named_expression !'='"));
+ expr_ty named_expression_var;
+ if (
+ (named_expression_var = named_expression_rule(p)) // named_expression
+ &&
+ _PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 22) // token='='
+ )
+ {
+ D(fprintf(stderr, "%*c+ _tmp_149[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "named_expression !'='"));
+ _res = named_expression_var;
+ goto done;
+ }
+ p->mark = _mark;
+ D(fprintf(stderr, "%*c%s _tmp_149[%d-%d]: %s failed!\n", p->level, ' ',
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "named_expression !'='"));
+ }
+ _res = NULL;
+ done:
+ D(p->level--);
+ return _res;
+}
+
+// _tmp_150: ',' star_target
+static void *
+_tmp_150_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -24371,7 +24457,7 @@ _tmp_148_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_148[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target"));
+ D(fprintf(stderr, "%*c> _tmp_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target"));
Token * _literal;
expr_ty c;
if (
@@ -24380,7 +24466,7 @@ _tmp_148_rule(Parser *p)
(c = star_target_rule(p)) // star_target
)
{
- D(fprintf(stderr, "%*c+ _tmp_148[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target"));
+ D(fprintf(stderr, "%*c+ _tmp_150[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target"));
_res = c;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -24390,7 +24476,7 @@ _tmp_148_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_148[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_150[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_target"));
}
_res = NULL;
@@ -24399,9 +24485,9 @@ _tmp_148_rule(Parser *p)
return _res;
}
-// _tmp_149: star_targets '='
+// _tmp_151: star_targets '='
static void *
-_tmp_149_rule(Parser *p)
+_tmp_151_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -24415,7 +24501,7 @@ _tmp_149_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_149[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
+ D(fprintf(stderr, "%*c> _tmp_151[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
Token * _literal;
expr_ty star_targets_var;
if (
@@ -24424,12 +24510,12 @@ _tmp_149_rule(Parser *p)
(_literal = _PyPegen_expect_token(p, 22)) // token='='
)
{
- D(fprintf(stderr, "%*c+ _tmp_149[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
+ D(fprintf(stderr, "%*c+ _tmp_151[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
_res = _PyPegen_dummy_name(p, star_targets_var, _literal);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_149[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_151[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='"));
}
_res = NULL;
@@ -24438,9 +24524,9 @@ _tmp_149_rule(Parser *p)
return _res;
}
-// _tmp_150: star_targets '='
+// _tmp_152: star_targets '='
static void *
-_tmp_150_rule(Parser *p)
+_tmp_152_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -24454,7 +24540,7 @@ _tmp_150_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
+ D(fprintf(stderr, "%*c> _tmp_152[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
Token * _literal;
expr_ty star_targets_var;
if (
@@ -24463,12 +24549,12 @@ _tmp_150_rule(Parser *p)
(_literal = _PyPegen_expect_token(p, 22)) // token='='
)
{
- D(fprintf(stderr, "%*c+ _tmp_150[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
+ D(fprintf(stderr, "%*c+ _tmp_152[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
_res = _PyPegen_dummy_name(p, star_targets_var, _literal);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_150[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_152[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='"));
}
_res = NULL;
@@ -24477,9 +24563,9 @@ _tmp_150_rule(Parser *p)
return _res;
}
-// _loop1_151: param_with_default
+// _loop1_153: param_with_default
static asdl_seq *
-_loop1_151_rule(Parser *p)
+_loop1_153_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -24503,7 +24589,7 @@ _loop1_151_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _loop1_151[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default"));
+ D(fprintf(stderr, "%*c> _loop1_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "param_with_default"));
NameDefaultPair* param_with_default_var;
while (
(param_with_default_var = param_with_default_rule(p)) // param_with_default
@@ -24525,7 +24611,7 @@ _loop1_151_rule(Parser *p)
_mark = p->mark;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _loop1_151[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _loop1_153[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "param_with_default"));
}
if (_n == 0 || p->error_indicator) {
@@ -24543,14 +24629,14 @@ _loop1_151_rule(Parser *p)
}
for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]);
PyMem_Free(_children);
- _PyPegen_insert_memo(p, _start_mark, _loop1_151_type, _seq);
+ _PyPegen_insert_memo(p, _start_mark, _loop1_153_type, _seq);
D(p->level--);
return _seq;
}
-// _loop1_152: lambda_param_with_default
+// _loop1_154: lambda_param_with_default
static asdl_seq *
-_loop1_152_rule(Parser *p)
+_loop1_154_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -24574,7 +24660,7 @@ _loop1_152_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _loop1_152[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default"));
+ D(fprintf(stderr, "%*c> _loop1_154[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "lambda_param_with_default"));
NameDefaultPair* lambda_param_with_default_var;
while (
(lambda_param_with_default_var = lambda_param_with_default_rule(p)) // lambda_param_with_default
@@ -24596,7 +24682,7 @@ _loop1_152_rule(Parser *p)
_mark = p->mark;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _loop1_152[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _loop1_154[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "lambda_param_with_default"));
}
if (_n == 0 || p->error_indicator) {
@@ -24614,14 +24700,14 @@ _loop1_152_rule(Parser *p)
}
for (int i = 0; i < _n; i++) asdl_seq_SET(_seq, i, _children[i]);
PyMem_Free(_children);
- _PyPegen_insert_memo(p, _start_mark, _loop1_152_type, _seq);
+ _PyPegen_insert_memo(p, _start_mark, _loop1_154_type, _seq);
D(p->level--);
return _seq;
}
-// _tmp_153: ')' | '**'
+// _tmp_155: ')' | '**'
static void *
-_tmp_153_rule(Parser *p)
+_tmp_155_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -24635,18 +24721,18 @@ _tmp_153_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'"));
+ D(fprintf(stderr, "%*c> _tmp_155[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 8)) // token=')'
)
{
- D(fprintf(stderr, "%*c+ _tmp_153[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'"));
+ D(fprintf(stderr, "%*c+ _tmp_155[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_153[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_155[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "')'"));
}
{ // '**'
@@ -24654,18 +24740,18 @@ _tmp_153_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'"));
+ D(fprintf(stderr, "%*c> _tmp_155[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 35)) // token='**'
)
{
- D(fprintf(stderr, "%*c+ _tmp_153[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'"));
+ D(fprintf(stderr, "%*c+ _tmp_155[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_153[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_155[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'"));
}
_res = NULL;
@@ -24674,9 +24760,9 @@ _tmp_153_rule(Parser *p)
return _res;
}
-// _tmp_154: ':' | '**'
+// _tmp_156: ':' | '**'
static void *
-_tmp_154_rule(Parser *p)
+_tmp_156_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -24690,18 +24776,18 @@ _tmp_154_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_154[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'"));
+ D(fprintf(stderr, "%*c> _tmp_156[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 11)) // token=':'
)
{
- D(fprintf(stderr, "%*c+ _tmp_154[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'"));
+ D(fprintf(stderr, "%*c+ _tmp_156[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_154[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_156[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':'"));
}
{ // '**'
@@ -24709,18 +24795,18 @@ _tmp_154_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_154[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'"));
+ D(fprintf(stderr, "%*c> _tmp_156[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 35)) // token='**'
)
{
- D(fprintf(stderr, "%*c+ _tmp_154[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'"));
+ D(fprintf(stderr, "%*c+ _tmp_156[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_154[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_156[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'"));
}
_res = NULL;