summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/whatsnew/3.10.rst14
-rw-r--r--Grammar/python.gram1
-rw-r--r--Lib/test/test_syntax.py8
-rw-r--r--Misc/NEWS.d/next/Core and Builtins/2021-06-03-22-51-50.bpo-44305.66dVDG.rst2
-rw-r--r--Parser/parser.c627
5 files changed, 383 insertions, 269 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index 92247e1..bc0f938 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -274,6 +274,20 @@ have been incorporated. Some of the most notable ones:
(Contributed by Pablo Galindo in :issue:`43823`)
+* ``try`` blocks without ``except`` or ``finally`` blocks:
+
+ .. code-block:: python
+
+ >>> try
+ ... x = 2
+ ... something = 3
+ File "<stdin>", line 3
+ something = 3
+ ^^^^^^^^^
+ SyntaxError: expected 'except' or 'finally' block
+
+ (Contributed by Pablo Galindo in :issue:`44305`)
+
* Usage of ``=`` instead of ``==`` in comparisons:
.. code-block:: python
diff --git a/Grammar/python.gram b/Grammar/python.gram
index 8b5d921..d0f9bb0 100644
--- a/Grammar/python.gram
+++ b/Grammar/python.gram
@@ -964,6 +964,7 @@ invalid_with_stmt_indent:
invalid_try_stmt:
| a='try' ':' NEWLINE !INDENT {
RAISE_INDENTATION_ERROR("expected an indented block after 'try' statement on line %d", a->lineno) }
+ | 'try' ':' block !('except' | 'finally') { RAISE_SYNTAX_ERROR("expected 'except' or 'finally' block") }
invalid_except_stmt:
| 'except' a=expression ',' expressions ['as' NAME ] ':' {
RAISE_SYNTAX_ERROR_STARTING_FROM(a, "multiple exception types must be parenthesized") }
diff --git a/Lib/test/test_syntax.py b/Lib/test/test_syntax.py
index c000028..5d3ce4c 100644
--- a/Lib/test/test_syntax.py
+++ b/Lib/test/test_syntax.py
@@ -882,6 +882,14 @@ leading to spurious errors.
Traceback (most recent call last):
SyntaxError: cannot assign to attribute here. Maybe you meant '==' instead of '='?
+Custom error messages for try blocks that are not followed by except/finally
+
+ >>> try:
+ ... x = 34
+ ...
+ Traceback (most recent call last):
+ SyntaxError: expected 'except' or 'finally' block
+
Ensure that early = are not matched by the parser as invalid comparisons
>>> f(2, 4, x=34); 1 $ 2
Traceback (most recent call last):
diff --git a/Misc/NEWS.d/next/Core and Builtins/2021-06-03-22-51-50.bpo-44305.66dVDG.rst b/Misc/NEWS.d/next/Core and Builtins/2021-06-03-22-51-50.bpo-44305.66dVDG.rst
new file mode 100644
index 0000000..eebc26f
--- /dev/null
+++ b/Misc/NEWS.d/next/Core and Builtins/2021-06-03-22-51-50.bpo-44305.66dVDG.rst
@@ -0,0 +1,2 @@
+Improve error message for ``try`` blocks without ``except`` or ``finally``
+blocks. Patch by Pablo Galindo.
diff --git a/Parser/parser.c b/Parser/parser.c
index 4e8a14c..8121884 100644
--- a/Parser/parser.c
+++ b/Parser/parser.c
@@ -467,9 +467,9 @@ static char *soft_keywords[] = {
#define _tmp_173_type 1393
#define _tmp_174_type 1394
#define _tmp_175_type 1395
-#define _loop0_177_type 1396
-#define _gather_176_type 1397
-#define _tmp_178_type 1398
+#define _tmp_176_type 1396
+#define _loop0_178_type 1397
+#define _gather_177_type 1398
#define _tmp_179_type 1399
#define _tmp_180_type 1400
#define _tmp_181_type 1401
@@ -496,6 +496,7 @@ static char *soft_keywords[] = {
#define _tmp_202_type 1422
#define _tmp_203_type 1423
#define _tmp_204_type 1424
+#define _tmp_205_type 1425
static mod_ty file_rule(Parser *p);
static mod_ty interactive_rule(Parser *p);
@@ -893,9 +894,9 @@ static void *_tmp_172_rule(Parser *p);
static void *_tmp_173_rule(Parser *p);
static void *_tmp_174_rule(Parser *p);
static void *_tmp_175_rule(Parser *p);
-static asdl_seq *_loop0_177_rule(Parser *p);
-static asdl_seq *_gather_176_rule(Parser *p);
-static void *_tmp_178_rule(Parser *p);
+static void *_tmp_176_rule(Parser *p);
+static asdl_seq *_loop0_178_rule(Parser *p);
+static asdl_seq *_gather_177_rule(Parser *p);
static void *_tmp_179_rule(Parser *p);
static void *_tmp_180_rule(Parser *p);
static void *_tmp_181_rule(Parser *p);
@@ -922,6 +923,7 @@ static void *_tmp_201_rule(Parser *p);
static void *_tmp_202_rule(Parser *p);
static void *_tmp_203_rule(Parser *p);
static void *_tmp_204_rule(Parser *p);
+static void *_tmp_205_rule(Parser *p);
// file: statements? $
@@ -20044,7 +20046,7 @@ invalid_with_stmt_indent_rule(Parser *p)
return _res;
}
-// invalid_try_stmt: 'try' ':' NEWLINE !INDENT
+// invalid_try_stmt: 'try' ':' NEWLINE !INDENT | 'try' ':' block !('except' | 'finally')
static void *
invalid_try_stmt_rule(Parser *p)
{
@@ -20087,6 +20089,38 @@ invalid_try_stmt_rule(Parser *p)
D(fprintf(stderr, "%*c%s invalid_try_stmt[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'try' ':' NEWLINE !INDENT"));
}
+ { // 'try' ':' block !('except' | 'finally')
+ if (p->error_indicator) {
+ D(p->level--);
+ return NULL;
+ }
+ D(fprintf(stderr, "%*c> invalid_try_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'try' ':' block !('except' | 'finally')"));
+ Token * _keyword;
+ Token * _literal;
+ asdl_stmt_seq* block_var;
+ if (
+ (_keyword = _PyPegen_expect_token(p, 511)) // token='try'
+ &&
+ (_literal = _PyPegen_expect_token(p, 11)) // token=':'
+ &&
+ (block_var = block_rule(p)) // block
+ &&
+ _PyPegen_lookahead(0, _tmp_171_rule, p)
+ )
+ {
+ D(fprintf(stderr, "%*c+ invalid_try_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'try' ':' block !('except' | 'finally')"));
+ _res = RAISE_SYNTAX_ERROR ( "expected 'except' or 'finally' block" );
+ if (_res == NULL && PyErr_Occurred()) {
+ p->error_indicator = 1;
+ D(p->level--);
+ return NULL;
+ }
+ goto done;
+ }
+ p->mark = _mark;
+ D(fprintf(stderr, "%*c%s invalid_try_stmt[%d-%d]: %s failed!\n", p->level, ' ',
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'try' ':' block !('except' | 'finally')"));
+ }
_res = NULL;
done:
D(p->level--);
@@ -20129,7 +20163,7 @@ invalid_except_stmt_rule(Parser *p)
&&
(expressions_var = expressions_rule(p)) // expressions
&&
- (_opt_var = _tmp_171_rule(p), 1) // ['as' NAME]
+ (_opt_var = _tmp_172_rule(p), 1) // ['as' NAME]
&&
(_literal_1 = _PyPegen_expect_token(p, 11)) // token=':'
)
@@ -20163,7 +20197,7 @@ invalid_except_stmt_rule(Parser *p)
&&
(expression_var = expression_rule(p)) // expression
&&
- (_opt_var = _tmp_172_rule(p), 1) // ['as' NAME]
+ (_opt_var = _tmp_173_rule(p), 1) // ['as' NAME]
&&
(newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE'
)
@@ -20293,7 +20327,7 @@ invalid_except_stmt_indent_rule(Parser *p)
&&
(expression_var = expression_rule(p)) // expression
&&
- (_opt_var = _tmp_173_rule(p), 1) // ['as' NAME]
+ (_opt_var = _tmp_174_rule(p), 1) // ['as' NAME]
&&
(_literal = _PyPegen_expect_token(p, 11)) // token=':'
&&
@@ -20933,7 +20967,7 @@ invalid_def_raw_rule(Parser *p)
&&
(_literal_1 = _PyPegen_expect_token(p, 8)) // token=')'
&&
- (_opt_var_2 = _tmp_174_rule(p), 1) // ['->' expression]
+ (_opt_var_2 = _tmp_175_rule(p), 1) // ['->' expression]
&&
(_literal_2 = _PyPegen_expect_token(p, 11)) // token=':'
&&
@@ -20989,7 +21023,7 @@ invalid_class_def_raw_rule(Parser *p)
&&
(name_var = _PyPegen_name_token(p)) // NAME
&&
- (_opt_var = _tmp_175_rule(p), 1) // ['(' arguments? ')']
+ (_opt_var = _tmp_176_rule(p), 1) // ['(' arguments? ')']
&&
(_literal = _PyPegen_expect_token(p, 11)) // token=':'
&&
@@ -21037,11 +21071,11 @@ invalid_double_starred_kvpairs_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> invalid_double_starred_kvpairs[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','.double_starred_kvpair+ ',' invalid_kvpair"));
- asdl_seq * _gather_176_var;
+ asdl_seq * _gather_177_var;
Token * _literal;
void *invalid_kvpair_var;
if (
- (_gather_176_var = _gather_176_rule(p)) // ','.double_starred_kvpair+
+ (_gather_177_var = _gather_177_rule(p)) // ','.double_starred_kvpair+
&&
(_literal = _PyPegen_expect_token(p, 12)) // token=','
&&
@@ -21049,7 +21083,7 @@ invalid_double_starred_kvpairs_rule(Parser *p)
)
{
D(fprintf(stderr, "%*c+ invalid_double_starred_kvpairs[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','.double_starred_kvpair+ ',' invalid_kvpair"));
- _res = _PyPegen_dummy_name(p, _gather_176_var, _literal, invalid_kvpair_var);
+ _res = _PyPegen_dummy_name(p, _gather_177_var, _literal, invalid_kvpair_var);
goto done;
}
p->mark = _mark;
@@ -21102,7 +21136,7 @@ invalid_double_starred_kvpairs_rule(Parser *p)
&&
(a = _PyPegen_expect_token(p, 11)) // token=':'
&&
- _PyPegen_lookahead(1, _tmp_178_rule, p)
+ _PyPegen_lookahead(1, _tmp_179_rule, p)
)
{
D(fprintf(stderr, "%*c+ invalid_double_starred_kvpairs[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression ':' &('}' | ',')"));
@@ -22475,12 +22509,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_179_var;
+ void *_tmp_180_var;
while (
- (_tmp_179_var = _tmp_179_rule(p)) // star_targets '='
+ (_tmp_180_var = _tmp_180_rule(p)) // star_targets '='
)
{
- _res = _tmp_179_var;
+ _res = _tmp_180_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -22983,12 +23017,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_180_var;
+ void *_tmp_181_var;
while (
- (_tmp_180_var = _tmp_180_rule(p)) // '.' | '...'
+ (_tmp_181_var = _tmp_181_rule(p)) // '.' | '...'
)
{
- _res = _tmp_180_var;
+ _res = _tmp_181_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -23049,12 +23083,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_181_var;
+ void *_tmp_182_var;
while (
- (_tmp_181_var = _tmp_181_rule(p)) // '.' | '...'
+ (_tmp_182_var = _tmp_182_rule(p)) // '.' | '...'
)
{
- _res = _tmp_181_var;
+ _res = _tmp_182_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -26165,12 +26199,12 @@ _loop1_84_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop1_84[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('@' named_expression NEWLINE)"));
- void *_tmp_182_var;
+ void *_tmp_183_var;
while (
- (_tmp_182_var = _tmp_182_rule(p)) // '@' named_expression NEWLINE
+ (_tmp_183_var = _tmp_183_rule(p)) // '@' named_expression NEWLINE
)
{
- _res = _tmp_182_var;
+ _res = _tmp_183_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -26283,12 +26317,12 @@ _loop1_86_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop1_86[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_expression)"));
- void *_tmp_183_var;
+ void *_tmp_184_var;
while (
- (_tmp_183_var = _tmp_183_rule(p)) // ',' star_expression
+ (_tmp_184_var = _tmp_184_rule(p)) // ',' star_expression
)
{
- _res = _tmp_183_var;
+ _res = _tmp_184_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -26468,12 +26502,12 @@ _loop1_89_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop1_89[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' expression)"));
- void *_tmp_184_var;
+ void *_tmp_185_var;
while (
- (_tmp_184_var = _tmp_184_rule(p)) // ',' expression
+ (_tmp_185_var = _tmp_185_rule(p)) // ',' expression
)
{
- _res = _tmp_184_var;
+ _res = _tmp_185_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -27498,12 +27532,12 @@ _loop1_104_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop1_104[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('or' conjunction)"));
- void *_tmp_185_var;
+ void *_tmp_186_var;
while (
- (_tmp_185_var = _tmp_185_rule(p)) // 'or' conjunction
+ (_tmp_186_var = _tmp_186_rule(p)) // 'or' conjunction
)
{
- _res = _tmp_185_var;
+ _res = _tmp_186_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -27569,12 +27603,12 @@ _loop1_105_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop1_105[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('and' inversion)"));
- void *_tmp_186_var;
+ void *_tmp_187_var;
while (
- (_tmp_186_var = _tmp_186_rule(p)) // 'and' inversion
+ (_tmp_187_var = _tmp_187_rule(p)) // 'and' inversion
)
{
- _res = _tmp_186_var;
+ _res = _tmp_187_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -28547,12 +28581,12 @@ _loop0_121_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop0_121[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('if' disjunction)"));
- void *_tmp_187_var;
+ void *_tmp_188_var;
while (
- (_tmp_187_var = _tmp_187_rule(p)) // 'if' disjunction
+ (_tmp_188_var = _tmp_188_rule(p)) // 'if' disjunction
)
{
- _res = _tmp_187_var;
+ _res = _tmp_188_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -28613,12 +28647,12 @@ _loop0_122_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop0_122[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "('if' disjunction)"));
- void *_tmp_188_var;
+ void *_tmp_189_var;
while (
- (_tmp_188_var = _tmp_188_rule(p)) // 'if' disjunction
+ (_tmp_189_var = _tmp_189_rule(p)) // 'if' disjunction
)
{
- _res = _tmp_188_var;
+ _res = _tmp_189_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -28684,7 +28718,7 @@ _loop0_124_rule(Parser *p)
while (
(_literal = _PyPegen_expect_token(p, 12)) // token=','
&&
- (elem = _tmp_189_rule(p)) // starred_expression | (assigment_expression | expression !':=') !'='
+ (elem = _tmp_190_rule(p)) // starred_expression | (assigment_expression | expression !':=') !'='
)
{
_res = elem;
@@ -28748,7 +28782,7 @@ _gather_123_rule(Parser *p)
void *elem;
asdl_seq * seq;
if (
- (elem = _tmp_189_rule(p)) // starred_expression | (assigment_expression | expression !':=') !'='
+ (elem = _tmp_190_rule(p)) // starred_expression | (assigment_expression | expression !':=') !'='
&&
(seq = _loop0_124_rule(p)) // _loop0_124
)
@@ -29294,12 +29328,12 @@ _loop0_134_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop0_134[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_target)"));
- void *_tmp_190_var;
+ void *_tmp_191_var;
while (
- (_tmp_190_var = _tmp_190_rule(p)) // ',' star_target
+ (_tmp_191_var = _tmp_191_rule(p)) // ',' star_target
)
{
- _res = _tmp_190_var;
+ _res = _tmp_191_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -29474,12 +29508,12 @@ _loop1_137_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop1_137[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(',' star_target)"));
- void *_tmp_191_var;
+ void *_tmp_192_var;
while (
- (_tmp_191_var = _tmp_191_rule(p)) // ',' star_target
+ (_tmp_192_var = _tmp_192_rule(p)) // ',' star_target
)
{
- _res = _tmp_191_var;
+ _res = _tmp_192_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -30273,12 +30307,12 @@ _loop0_150_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop0_150[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')"));
- void *_tmp_192_var;
+ void *_tmp_193_var;
while (
- (_tmp_192_var = _tmp_192_rule(p)) // star_targets '='
+ (_tmp_193_var = _tmp_193_rule(p)) // star_targets '='
)
{
- _res = _tmp_192_var;
+ _res = _tmp_193_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -30339,12 +30373,12 @@ _loop0_151_rule(Parser *p)
return NULL;
}
D(fprintf(stderr, "%*c> _loop0_151[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(star_targets '=')"));
- void *_tmp_193_var;
+ void *_tmp_194_var;
while (
- (_tmp_193_var = _tmp_193_rule(p)) // star_targets '='
+ (_tmp_194_var = _tmp_194_rule(p)) // star_targets '='
)
{
- _res = _tmp_193_var;
+ _res = _tmp_194_var;
if (_n == _children_capacity) {
_children_capacity *= 2;
void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));
@@ -30928,15 +30962,15 @@ _tmp_160_rule(Parser *p)
}
D(fprintf(stderr, "%*c> _tmp_160[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')"));
Token * _literal;
- void *_tmp_194_var;
+ void *_tmp_195_var;
if (
(_literal = _PyPegen_expect_token(p, 12)) // token=','
&&
- (_tmp_194_var = _tmp_194_rule(p)) // ')' | '**'
+ (_tmp_195_var = _tmp_195_rule(p)) // ')' | '**'
)
{
D(fprintf(stderr, "%*c+ _tmp_160[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (')' | '**')"));
- _res = _PyPegen_dummy_name(p, _literal, _tmp_194_var);
+ _res = _PyPegen_dummy_name(p, _literal, _tmp_195_var);
goto done;
}
p->mark = _mark;
@@ -30986,15 +31020,15 @@ _tmp_161_rule(Parser *p)
}
D(fprintf(stderr, "%*c> _tmp_161[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')"));
Token * _literal;
- void *_tmp_195_var;
+ void *_tmp_196_var;
if (
(_literal = _PyPegen_expect_token(p, 12)) // token=','
&&
- (_tmp_195_var = _tmp_195_rule(p)) // ':' | '**'
+ (_tmp_196_var = _tmp_196_rule(p)) // ':' | '**'
)
{
D(fprintf(stderr, "%*c+ _tmp_161[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' (':' | '**')"));
- _res = _PyPegen_dummy_name(p, _literal, _tmp_195_var);
+ _res = _PyPegen_dummy_name(p, _literal, _tmp_196_var);
goto done;
}
p->mark = _mark;
@@ -31113,7 +31147,7 @@ _loop0_164_rule(Parser *p)
while (
(_literal = _PyPegen_expect_token(p, 12)) // token=','
&&
- (elem = _tmp_196_rule(p)) // expression ['as' star_target]
+ (elem = _tmp_197_rule(p)) // expression ['as' star_target]
)
{
_res = elem;
@@ -31176,7 +31210,7 @@ _gather_163_rule(Parser *p)
void *elem;
asdl_seq * seq;
if (
- (elem = _tmp_196_rule(p)) // expression ['as' star_target]
+ (elem = _tmp_197_rule(p)) // expression ['as' star_target]
&&
(seq = _loop0_164_rule(p)) // _loop0_164
)
@@ -31227,7 +31261,7 @@ _loop0_166_rule(Parser *p)
while (
(_literal = _PyPegen_expect_token(p, 12)) // token=','
&&
- (elem = _tmp_197_rule(p)) // expressions ['as' star_target]
+ (elem = _tmp_198_rule(p)) // expressions ['as' star_target]
)
{
_res = elem;
@@ -31290,7 +31324,7 @@ _gather_165_rule(Parser *p)
void *elem;
asdl_seq * seq;
if (
- (elem = _tmp_197_rule(p)) // expressions ['as' star_target]
+ (elem = _tmp_198_rule(p)) // expressions ['as' star_target]
&&
(seq = _loop0_166_rule(p)) // _loop0_166
)
@@ -31341,7 +31375,7 @@ _loop0_168_rule(Parser *p)
while (
(_literal = _PyPegen_expect_token(p, 12)) // token=','
&&
- (elem = _tmp_198_rule(p)) // expression ['as' star_target]
+ (elem = _tmp_199_rule(p)) // expression ['as' star_target]
)
{
_res = elem;
@@ -31404,7 +31438,7 @@ _gather_167_rule(Parser *p)
void *elem;
asdl_seq * seq;
if (
- (elem = _tmp_198_rule(p)) // expression ['as' star_target]
+ (elem = _tmp_199_rule(p)) // expression ['as' star_target]
&&
(seq = _loop0_168_rule(p)) // _loop0_168
)
@@ -31455,7 +31489,7 @@ _loop0_170_rule(Parser *p)
while (
(_literal = _PyPegen_expect_token(p, 12)) // token=','
&&
- (elem = _tmp_199_rule(p)) // expressions ['as' star_target]
+ (elem = _tmp_200_rule(p)) // expressions ['as' star_target]
)
{
_res = elem;
@@ -31518,7 +31552,7 @@ _gather_169_rule(Parser *p)
void *elem;
asdl_seq * seq;
if (
- (elem = _tmp_199_rule(p)) // expressions ['as' star_target]
+ (elem = _tmp_200_rule(p)) // expressions ['as' star_target]
&&
(seq = _loop0_170_rule(p)) // _loop0_170
)
@@ -31537,7 +31571,7 @@ _gather_169_rule(Parser *p)
return _res;
}
-// _tmp_171: 'as' NAME
+// _tmp_171: 'except' | 'finally'
static void *
_tmp_171_rule(Parser *p)
{
@@ -31548,27 +31582,43 @@ _tmp_171_rule(Parser *p)
}
void * _res = NULL;
int _mark = p->mark;
- { // 'as' NAME
+ { // 'except'
if (p->error_indicator) {
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_171[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' NAME"));
+ D(fprintf(stderr, "%*c> _tmp_171[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'except'"));
Token * _keyword;
- expr_ty name_var;
if (
- (_keyword = _PyPegen_expect_token(p, 520)) // token='as'
- &&
- (name_var = _PyPegen_name_token(p)) // NAME
+ (_keyword = _PyPegen_expect_token(p, 521)) // token='except'
)
{
- D(fprintf(stderr, "%*c+ _tmp_171[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' NAME"));
- _res = _PyPegen_dummy_name(p, _keyword, name_var);
+ D(fprintf(stderr, "%*c+ _tmp_171[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'except'"));
+ _res = _keyword;
goto done;
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s _tmp_171[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'as' NAME"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'except'"));
+ }
+ { // 'finally'
+ if (p->error_indicator) {
+ D(p->level--);
+ return NULL;
+ }
+ D(fprintf(stderr, "%*c> _tmp_171[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'finally'"));
+ Token * _keyword;
+ if (
+ (_keyword = _PyPegen_expect_token(p, 522)) // token='finally'
+ )
+ {
+ D(fprintf(stderr, "%*c+ _tmp_171[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'finally'"));
+ _res = _keyword;
+ goto done;
+ }
+ p->mark = _mark;
+ D(fprintf(stderr, "%*c%s _tmp_171[%d-%d]: %s failed!\n", p->level, ' ',
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'finally'"));
}
_res = NULL;
done:
@@ -31654,7 +31704,7 @@ _tmp_173_rule(Parser *p)
return _res;
}
-// _tmp_174: '->' expression
+// _tmp_174: 'as' NAME
static void *
_tmp_174_rule(Parser *p)
{
@@ -31665,12 +31715,51 @@ _tmp_174_rule(Parser *p)
}
void * _res = NULL;
int _mark = p->mark;
+ { // 'as' NAME
+ if (p->error_indicator) {
+ D(p->level--);
+ return NULL;
+ }
+ D(fprintf(stderr, "%*c> _tmp_174[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' NAME"));
+ Token * _keyword;
+ expr_ty name_var;
+ if (
+ (_keyword = _PyPegen_expect_token(p, 520)) // token='as'
+ &&
+ (name_var = _PyPegen_name_token(p)) // NAME
+ )
+ {
+ D(fprintf(stderr, "%*c+ _tmp_174[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' NAME"));
+ _res = _PyPegen_dummy_name(p, _keyword, name_var);
+ goto done;
+ }
+ p->mark = _mark;
+ D(fprintf(stderr, "%*c%s _tmp_174[%d-%d]: %s failed!\n", p->level, ' ',
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'as' NAME"));
+ }
+ _res = NULL;
+ done:
+ D(p->level--);
+ return _res;
+}
+
+// _tmp_175: '->' expression
+static void *
+_tmp_175_rule(Parser *p)
+{
+ D(p->level++);
+ if (p->error_indicator) {
+ D(p->level--);
+ return NULL;
+ }
+ void * _res = NULL;
+ int _mark = p->mark;
{ // '->' expression
if (p->error_indicator) {
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_174[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'->' expression"));
+ D(fprintf(stderr, "%*c> _tmp_175[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'->' expression"));
Token * _literal;
expr_ty expression_var;
if (
@@ -31679,12 +31768,12 @@ _tmp_174_rule(Parser *p)
(expression_var = expression_rule(p)) // expression
)
{
- D(fprintf(stderr, "%*c+ _tmp_174[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'->' expression"));
+ D(fprintf(stderr, "%*c+ _tmp_175[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'->' expression"));
_res = _PyPegen_dummy_name(p, _literal, expression_var);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_174[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_175[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'->' expression"));
}
_res = NULL;
@@ -31693,9 +31782,9 @@ _tmp_174_rule(Parser *p)
return _res;
}
-// _tmp_175: '(' arguments? ')'
+// _tmp_176: '(' arguments? ')'
static void *
-_tmp_175_rule(Parser *p)
+_tmp_176_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -31709,7 +31798,7 @@ _tmp_175_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_175[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'(' arguments? ')'"));
+ D(fprintf(stderr, "%*c> _tmp_176[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'(' arguments? ')'"));
Token * _literal;
Token * _literal_1;
void *_opt_var;
@@ -31722,12 +31811,12 @@ _tmp_175_rule(Parser *p)
(_literal_1 = _PyPegen_expect_token(p, 8)) // token=')'
)
{
- D(fprintf(stderr, "%*c+ _tmp_175[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'(' arguments? ')'"));
+ D(fprintf(stderr, "%*c+ _tmp_176[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'(' arguments? ')'"));
_res = _PyPegen_dummy_name(p, _literal, _opt_var, _literal_1);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_175[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_176[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'(' arguments? ')'"));
}
_res = NULL;
@@ -31736,9 +31825,9 @@ _tmp_175_rule(Parser *p)
return _res;
}
-// _loop0_177: ',' double_starred_kvpair
+// _loop0_178: ',' double_starred_kvpair
static asdl_seq *
-_loop0_177_rule(Parser *p)
+_loop0_178_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -31762,7 +31851,7 @@ _loop0_177_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _loop0_177[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' double_starred_kvpair"));
+ D(fprintf(stderr, "%*c> _loop0_178[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' double_starred_kvpair"));
Token * _literal;
KeyValuePair* elem;
while (
@@ -31793,7 +31882,7 @@ _loop0_177_rule(Parser *p)
_mark = p->mark;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _loop0_177[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _loop0_178[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' double_starred_kvpair"));
}
asdl_seq *_seq = (asdl_seq*)_Py_asdl_generic_seq_new(_n, p->arena);
@@ -31806,14 +31895,14 @@ _loop0_177_rule(Parser *p)
}
for (int i = 0; i < _n; i++) asdl_seq_SET_UNTYPED(_seq, i, _children[i]);
PyMem_Free(_children);
- _PyPegen_insert_memo(p, _start_mark, _loop0_177_type, _seq);
+ _PyPegen_insert_memo(p, _start_mark, _loop0_178_type, _seq);
D(p->level--);
return _seq;
}
-// _gather_176: double_starred_kvpair _loop0_177
+// _gather_177: double_starred_kvpair _loop0_178
static asdl_seq *
-_gather_176_rule(Parser *p)
+_gather_177_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -31822,27 +31911,27 @@ _gather_176_rule(Parser *p)
}
asdl_seq * _res = NULL;
int _mark = p->mark;
- { // double_starred_kvpair _loop0_177
+ { // double_starred_kvpair _loop0_178
if (p->error_indicator) {
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _gather_176[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "double_starred_kvpair _loop0_177"));
+ D(fprintf(stderr, "%*c> _gather_177[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "double_starred_kvpair _loop0_178"));
KeyValuePair* elem;
asdl_seq * seq;
if (
(elem = double_starred_kvpair_rule(p)) // double_starred_kvpair
&&
- (seq = _loop0_177_rule(p)) // _loop0_177
+ (seq = _loop0_178_rule(p)) // _loop0_178
)
{
- D(fprintf(stderr, "%*c+ _gather_176[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "double_starred_kvpair _loop0_177"));
+ D(fprintf(stderr, "%*c+ _gather_177[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "double_starred_kvpair _loop0_178"));
_res = _PyPegen_seq_insert_in_front(p, elem, seq);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _gather_176[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "double_starred_kvpair _loop0_177"));
+ D(fprintf(stderr, "%*c%s _gather_177[%d-%d]: %s failed!\n", p->level, ' ',
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "double_starred_kvpair _loop0_178"));
}
_res = NULL;
done:
@@ -31850,9 +31939,9 @@ _gather_176_rule(Parser *p)
return _res;
}
-// _tmp_178: '}' | ','
+// _tmp_179: '}' | ','
static void *
-_tmp_178_rule(Parser *p)
+_tmp_179_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -31866,18 +31955,18 @@ _tmp_178_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_178[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'}'"));
+ D(fprintf(stderr, "%*c> _tmp_179[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'}'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 26)) // token='}'
)
{
- D(fprintf(stderr, "%*c+ _tmp_178[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'}'"));
+ D(fprintf(stderr, "%*c+ _tmp_179[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'}'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_178[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_179[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'}'"));
}
{ // ','
@@ -31885,18 +31974,18 @@ _tmp_178_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_178[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','"));
+ D(fprintf(stderr, "%*c> _tmp_179[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "','"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 12)) // token=','
)
{
- D(fprintf(stderr, "%*c+ _tmp_178[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','"));
+ D(fprintf(stderr, "%*c+ _tmp_179[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "','"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_178[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_179[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "','"));
}
_res = NULL;
@@ -31905,9 +31994,9 @@ _tmp_178_rule(Parser *p)
return _res;
}
-// _tmp_179: star_targets '='
+// _tmp_180: star_targets '='
static void *
-_tmp_179_rule(Parser *p)
+_tmp_180_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -31921,7 +32010,7 @@ _tmp_179_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_179[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
+ D(fprintf(stderr, "%*c> _tmp_180[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
Token * _literal;
expr_ty z;
if (
@@ -31930,7 +32019,7 @@ _tmp_179_rule(Parser *p)
(_literal = _PyPegen_expect_token(p, 22)) // token='='
)
{
- D(fprintf(stderr, "%*c+ _tmp_179[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
+ D(fprintf(stderr, "%*c+ _tmp_180[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
_res = z;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -31940,7 +32029,7 @@ _tmp_179_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_179[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_180[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='"));
}
_res = NULL;
@@ -31949,9 +32038,9 @@ _tmp_179_rule(Parser *p)
return _res;
}
-// _tmp_180: '.' | '...'
+// _tmp_181: '.' | '...'
static void *
-_tmp_180_rule(Parser *p)
+_tmp_181_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -31965,18 +32054,18 @@ _tmp_180_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_180[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'"));
+ D(fprintf(stderr, "%*c> _tmp_181[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 23)) // token='.'
)
{
- D(fprintf(stderr, "%*c+ _tmp_180[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'"));
+ D(fprintf(stderr, "%*c+ _tmp_181[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_180[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_181[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'.'"));
}
{ // '...'
@@ -31984,18 +32073,18 @@ _tmp_180_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_180[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'"));
+ D(fprintf(stderr, "%*c> _tmp_181[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 52)) // token='...'
)
{
- D(fprintf(stderr, "%*c+ _tmp_180[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'"));
+ D(fprintf(stderr, "%*c+ _tmp_181[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_180[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_181[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'...'"));
}
_res = NULL;
@@ -32004,9 +32093,9 @@ _tmp_180_rule(Parser *p)
return _res;
}
-// _tmp_181: '.' | '...'
+// _tmp_182: '.' | '...'
static void *
-_tmp_181_rule(Parser *p)
+_tmp_182_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32020,18 +32109,18 @@ _tmp_181_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_181[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'"));
+ D(fprintf(stderr, "%*c> _tmp_182[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'.'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 23)) // token='.'
)
{
- D(fprintf(stderr, "%*c+ _tmp_181[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'"));
+ D(fprintf(stderr, "%*c+ _tmp_182[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'.'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_181[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_182[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'.'"));
}
{ // '...'
@@ -32039,18 +32128,18 @@ _tmp_181_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_181[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'"));
+ D(fprintf(stderr, "%*c> _tmp_182[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'...'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 52)) // token='...'
)
{
- D(fprintf(stderr, "%*c+ _tmp_181[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'"));
+ D(fprintf(stderr, "%*c+ _tmp_182[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'...'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_181[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_182[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'...'"));
}
_res = NULL;
@@ -32059,9 +32148,9 @@ _tmp_181_rule(Parser *p)
return _res;
}
-// _tmp_182: '@' named_expression NEWLINE
+// _tmp_183: '@' named_expression NEWLINE
static void *
-_tmp_182_rule(Parser *p)
+_tmp_183_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32075,7 +32164,7 @@ _tmp_182_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_182[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE"));
+ D(fprintf(stderr, "%*c> _tmp_183[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE"));
Token * _literal;
expr_ty f;
Token * newline_var;
@@ -32087,7 +32176,7 @@ _tmp_182_rule(Parser *p)
(newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE'
)
{
- D(fprintf(stderr, "%*c+ _tmp_182[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE"));
+ D(fprintf(stderr, "%*c+ _tmp_183[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'@' named_expression NEWLINE"));
_res = f;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -32097,7 +32186,7 @@ _tmp_182_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_182[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_183[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'@' named_expression NEWLINE"));
}
_res = NULL;
@@ -32106,9 +32195,9 @@ _tmp_182_rule(Parser *p)
return _res;
}
-// _tmp_183: ',' star_expression
+// _tmp_184: ',' star_expression
static void *
-_tmp_183_rule(Parser *p)
+_tmp_184_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32122,7 +32211,7 @@ _tmp_183_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_183[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_expression"));
+ D(fprintf(stderr, "%*c> _tmp_184[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_expression"));
Token * _literal;
expr_ty c;
if (
@@ -32131,7 +32220,7 @@ _tmp_183_rule(Parser *p)
(c = star_expression_rule(p)) // star_expression
)
{
- D(fprintf(stderr, "%*c+ _tmp_183[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_expression"));
+ D(fprintf(stderr, "%*c+ _tmp_184[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_expression"));
_res = c;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -32141,7 +32230,7 @@ _tmp_183_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_183[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_184[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_expression"));
}
_res = NULL;
@@ -32150,9 +32239,9 @@ _tmp_183_rule(Parser *p)
return _res;
}
-// _tmp_184: ',' expression
+// _tmp_185: ',' expression
static void *
-_tmp_184_rule(Parser *p)
+_tmp_185_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32166,7 +32255,7 @@ _tmp_184_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_184[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' expression"));
+ D(fprintf(stderr, "%*c> _tmp_185[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' expression"));
Token * _literal;
expr_ty c;
if (
@@ -32175,7 +32264,7 @@ _tmp_184_rule(Parser *p)
(c = expression_rule(p)) // expression
)
{
- D(fprintf(stderr, "%*c+ _tmp_184[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' expression"));
+ D(fprintf(stderr, "%*c+ _tmp_185[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' expression"));
_res = c;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -32185,7 +32274,7 @@ _tmp_184_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_184[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_185[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' expression"));
}
_res = NULL;
@@ -32194,9 +32283,9 @@ _tmp_184_rule(Parser *p)
return _res;
}
-// _tmp_185: 'or' conjunction
+// _tmp_186: 'or' conjunction
static void *
-_tmp_185_rule(Parser *p)
+_tmp_186_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32210,7 +32299,7 @@ _tmp_185_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_185[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'or' conjunction"));
+ D(fprintf(stderr, "%*c> _tmp_186[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'or' conjunction"));
Token * _keyword;
expr_ty c;
if (
@@ -32219,7 +32308,7 @@ _tmp_185_rule(Parser *p)
(c = conjunction_rule(p)) // conjunction
)
{
- D(fprintf(stderr, "%*c+ _tmp_185[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'or' conjunction"));
+ D(fprintf(stderr, "%*c+ _tmp_186[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'or' conjunction"));
_res = c;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -32229,7 +32318,7 @@ _tmp_185_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_185[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_186[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'or' conjunction"));
}
_res = NULL;
@@ -32238,9 +32327,9 @@ _tmp_185_rule(Parser *p)
return _res;
}
-// _tmp_186: 'and' inversion
+// _tmp_187: 'and' inversion
static void *
-_tmp_186_rule(Parser *p)
+_tmp_187_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32254,7 +32343,7 @@ _tmp_186_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_186[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'and' inversion"));
+ D(fprintf(stderr, "%*c> _tmp_187[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'and' inversion"));
Token * _keyword;
expr_ty c;
if (
@@ -32263,7 +32352,7 @@ _tmp_186_rule(Parser *p)
(c = inversion_rule(p)) // inversion
)
{
- D(fprintf(stderr, "%*c+ _tmp_186[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'and' inversion"));
+ D(fprintf(stderr, "%*c+ _tmp_187[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'and' inversion"));
_res = c;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -32273,7 +32362,7 @@ _tmp_186_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_186[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_187[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'and' inversion"));
}
_res = NULL;
@@ -32282,9 +32371,9 @@ _tmp_186_rule(Parser *p)
return _res;
}
-// _tmp_187: 'if' disjunction
+// _tmp_188: 'if' disjunction
static void *
-_tmp_187_rule(Parser *p)
+_tmp_188_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32298,7 +32387,7 @@ _tmp_187_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_187[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction"));
+ D(fprintf(stderr, "%*c> _tmp_188[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction"));
Token * _keyword;
expr_ty z;
if (
@@ -32307,7 +32396,7 @@ _tmp_187_rule(Parser *p)
(z = disjunction_rule(p)) // disjunction
)
{
- D(fprintf(stderr, "%*c+ _tmp_187[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction"));
+ D(fprintf(stderr, "%*c+ _tmp_188[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction"));
_res = z;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -32317,7 +32406,7 @@ _tmp_187_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_187[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_188[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' disjunction"));
}
_res = NULL;
@@ -32326,9 +32415,9 @@ _tmp_187_rule(Parser *p)
return _res;
}
-// _tmp_188: 'if' disjunction
+// _tmp_189: 'if' disjunction
static void *
-_tmp_188_rule(Parser *p)
+_tmp_189_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32342,7 +32431,7 @@ _tmp_188_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_188[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction"));
+ D(fprintf(stderr, "%*c> _tmp_189[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'if' disjunction"));
Token * _keyword;
expr_ty z;
if (
@@ -32351,7 +32440,7 @@ _tmp_188_rule(Parser *p)
(z = disjunction_rule(p)) // disjunction
)
{
- D(fprintf(stderr, "%*c+ _tmp_188[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction"));
+ D(fprintf(stderr, "%*c+ _tmp_189[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'if' disjunction"));
_res = z;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -32361,7 +32450,7 @@ _tmp_188_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_188[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_189[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'if' disjunction"));
}
_res = NULL;
@@ -32370,9 +32459,9 @@ _tmp_188_rule(Parser *p)
return _res;
}
-// _tmp_189: starred_expression | (assigment_expression | expression !':=') !'='
+// _tmp_190: starred_expression | (assigment_expression | expression !':=') !'='
static void *
-_tmp_189_rule(Parser *p)
+_tmp_190_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32386,18 +32475,18 @@ _tmp_189_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_189[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "starred_expression"));
+ D(fprintf(stderr, "%*c> _tmp_190[%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_189[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "starred_expression"));
+ D(fprintf(stderr, "%*c+ _tmp_190[%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_189[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_190[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "starred_expression"));
}
{ // (assigment_expression | expression !':=') !'='
@@ -32405,20 +32494,20 @@ _tmp_189_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_189[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(assigment_expression | expression !':=') !'='"));
- void *_tmp_200_var;
+ D(fprintf(stderr, "%*c> _tmp_190[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "(assigment_expression | expression !':=') !'='"));
+ void *_tmp_201_var;
if (
- (_tmp_200_var = _tmp_200_rule(p)) // assigment_expression | expression !':='
+ (_tmp_201_var = _tmp_201_rule(p)) // assigment_expression | expression !':='
&&
_PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 22) // token='='
)
{
- D(fprintf(stderr, "%*c+ _tmp_189[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "(assigment_expression | expression !':=') !'='"));
- _res = _tmp_200_var;
+ D(fprintf(stderr, "%*c+ _tmp_190[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "(assigment_expression | expression !':=') !'='"));
+ _res = _tmp_201_var;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_189[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_190[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "(assigment_expression | expression !':=') !'='"));
}
_res = NULL;
@@ -32427,9 +32516,9 @@ _tmp_189_rule(Parser *p)
return _res;
}
-// _tmp_190: ',' star_target
+// _tmp_191: ',' star_target
static void *
-_tmp_190_rule(Parser *p)
+_tmp_191_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32443,7 +32532,7 @@ _tmp_190_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_190[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target"));
+ D(fprintf(stderr, "%*c> _tmp_191[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target"));
Token * _literal;
expr_ty c;
if (
@@ -32452,7 +32541,7 @@ _tmp_190_rule(Parser *p)
(c = star_target_rule(p)) // star_target
)
{
- D(fprintf(stderr, "%*c+ _tmp_190[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target"));
+ D(fprintf(stderr, "%*c+ _tmp_191[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target"));
_res = c;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -32462,7 +32551,7 @@ _tmp_190_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_190[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_191[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_target"));
}
_res = NULL;
@@ -32471,9 +32560,9 @@ _tmp_190_rule(Parser *p)
return _res;
}
-// _tmp_191: ',' star_target
+// _tmp_192: ',' star_target
static void *
-_tmp_191_rule(Parser *p)
+_tmp_192_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32487,7 +32576,7 @@ _tmp_191_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_191[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target"));
+ D(fprintf(stderr, "%*c> _tmp_192[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "',' star_target"));
Token * _literal;
expr_ty c;
if (
@@ -32496,7 +32585,7 @@ _tmp_191_rule(Parser *p)
(c = star_target_rule(p)) // star_target
)
{
- D(fprintf(stderr, "%*c+ _tmp_191[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target"));
+ D(fprintf(stderr, "%*c+ _tmp_192[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "',' star_target"));
_res = c;
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -32506,7 +32595,7 @@ _tmp_191_rule(Parser *p)
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_191[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_192[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "',' star_target"));
}
_res = NULL;
@@ -32515,9 +32604,9 @@ _tmp_191_rule(Parser *p)
return _res;
}
-// _tmp_192: star_targets '='
+// _tmp_193: star_targets '='
static void *
-_tmp_192_rule(Parser *p)
+_tmp_193_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32531,7 +32620,7 @@ _tmp_192_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_192[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
+ D(fprintf(stderr, "%*c> _tmp_193[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
Token * _literal;
expr_ty star_targets_var;
if (
@@ -32540,12 +32629,12 @@ _tmp_192_rule(Parser *p)
(_literal = _PyPegen_expect_token(p, 22)) // token='='
)
{
- D(fprintf(stderr, "%*c+ _tmp_192[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
+ D(fprintf(stderr, "%*c+ _tmp_193[%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_192[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_193[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='"));
}
_res = NULL;
@@ -32554,9 +32643,9 @@ _tmp_192_rule(Parser *p)
return _res;
}
-// _tmp_193: star_targets '='
+// _tmp_194: star_targets '='
static void *
-_tmp_193_rule(Parser *p)
+_tmp_194_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32570,7 +32659,7 @@ _tmp_193_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_193[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
+ D(fprintf(stderr, "%*c> _tmp_194[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
Token * _literal;
expr_ty star_targets_var;
if (
@@ -32579,12 +32668,12 @@ _tmp_193_rule(Parser *p)
(_literal = _PyPegen_expect_token(p, 22)) // token='='
)
{
- D(fprintf(stderr, "%*c+ _tmp_193[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "star_targets '='"));
+ D(fprintf(stderr, "%*c+ _tmp_194[%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_193[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_194[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "star_targets '='"));
}
_res = NULL;
@@ -32593,9 +32682,9 @@ _tmp_193_rule(Parser *p)
return _res;
}
-// _tmp_194: ')' | '**'
+// _tmp_195: ')' | '**'
static void *
-_tmp_194_rule(Parser *p)
+_tmp_195_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32609,18 +32698,18 @@ _tmp_194_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_194[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'"));
+ D(fprintf(stderr, "%*c> _tmp_195[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "')'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 8)) // token=')'
)
{
- D(fprintf(stderr, "%*c+ _tmp_194[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'"));
+ D(fprintf(stderr, "%*c+ _tmp_195[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "')'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_194[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_195[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "')'"));
}
{ // '**'
@@ -32628,18 +32717,18 @@ _tmp_194_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_194[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'"));
+ D(fprintf(stderr, "%*c> _tmp_195[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 35)) // token='**'
)
{
- D(fprintf(stderr, "%*c+ _tmp_194[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'"));
+ D(fprintf(stderr, "%*c+ _tmp_195[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_194[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_195[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'"));
}
_res = NULL;
@@ -32648,9 +32737,9 @@ _tmp_194_rule(Parser *p)
return _res;
}
-// _tmp_195: ':' | '**'
+// _tmp_196: ':' | '**'
static void *
-_tmp_195_rule(Parser *p)
+_tmp_196_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32664,18 +32753,18 @@ _tmp_195_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_195[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'"));
+ D(fprintf(stderr, "%*c> _tmp_196[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "':'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 11)) // token=':'
)
{
- D(fprintf(stderr, "%*c+ _tmp_195[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'"));
+ D(fprintf(stderr, "%*c+ _tmp_196[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "':'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_195[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_196[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "':'"));
}
{ // '**'
@@ -32683,18 +32772,18 @@ _tmp_195_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_195[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'"));
+ D(fprintf(stderr, "%*c> _tmp_196[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'**'"));
Token * _literal;
if (
(_literal = _PyPegen_expect_token(p, 35)) // token='**'
)
{
- D(fprintf(stderr, "%*c+ _tmp_195[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'"));
+ D(fprintf(stderr, "%*c+ _tmp_196[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'**'"));
_res = _literal;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_195[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_196[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'**'"));
}
_res = NULL;
@@ -32703,9 +32792,9 @@ _tmp_195_rule(Parser *p)
return _res;
}
-// _tmp_196: expression ['as' star_target]
+// _tmp_197: expression ['as' star_target]
static void *
-_tmp_196_rule(Parser *p)
+_tmp_197_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32719,22 +32808,22 @@ _tmp_196_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_196[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]"));
+ D(fprintf(stderr, "%*c> _tmp_197[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]"));
void *_opt_var;
UNUSED(_opt_var); // Silence compiler warnings
expr_ty expression_var;
if (
(expression_var = expression_rule(p)) // expression
&&
- (_opt_var = _tmp_201_rule(p), 1) // ['as' star_target]
+ (_opt_var = _tmp_202_rule(p), 1) // ['as' star_target]
)
{
- D(fprintf(stderr, "%*c+ _tmp_196[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]"));
+ D(fprintf(stderr, "%*c+ _tmp_197[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]"));
_res = _PyPegen_dummy_name(p, expression_var, _opt_var);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_196[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_197[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression ['as' star_target]"));
}
_res = NULL;
@@ -32743,9 +32832,9 @@ _tmp_196_rule(Parser *p)
return _res;
}
-// _tmp_197: expressions ['as' star_target]
+// _tmp_198: expressions ['as' star_target]
static void *
-_tmp_197_rule(Parser *p)
+_tmp_198_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32759,22 +32848,22 @@ _tmp_197_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_197[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]"));
+ D(fprintf(stderr, "%*c> _tmp_198[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]"));
void *_opt_var;
UNUSED(_opt_var); // Silence compiler warnings
expr_ty expressions_var;
if (
(expressions_var = expressions_rule(p)) // expressions
&&
- (_opt_var = _tmp_202_rule(p), 1) // ['as' star_target]
+ (_opt_var = _tmp_203_rule(p), 1) // ['as' star_target]
)
{
- D(fprintf(stderr, "%*c+ _tmp_197[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]"));
+ D(fprintf(stderr, "%*c+ _tmp_198[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]"));
_res = _PyPegen_dummy_name(p, expressions_var, _opt_var);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_197[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_198[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expressions ['as' star_target]"));
}
_res = NULL;
@@ -32783,9 +32872,9 @@ _tmp_197_rule(Parser *p)
return _res;
}
-// _tmp_198: expression ['as' star_target]
+// _tmp_199: expression ['as' star_target]
static void *
-_tmp_198_rule(Parser *p)
+_tmp_199_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32799,22 +32888,22 @@ _tmp_198_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_198[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]"));
+ D(fprintf(stderr, "%*c> _tmp_199[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]"));
void *_opt_var;
UNUSED(_opt_var); // Silence compiler warnings
expr_ty expression_var;
if (
(expression_var = expression_rule(p)) // expression
&&
- (_opt_var = _tmp_203_rule(p), 1) // ['as' star_target]
+ (_opt_var = _tmp_204_rule(p), 1) // ['as' star_target]
)
{
- D(fprintf(stderr, "%*c+ _tmp_198[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]"));
+ D(fprintf(stderr, "%*c+ _tmp_199[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression ['as' star_target]"));
_res = _PyPegen_dummy_name(p, expression_var, _opt_var);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_198[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_199[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression ['as' star_target]"));
}
_res = NULL;
@@ -32823,9 +32912,9 @@ _tmp_198_rule(Parser *p)
return _res;
}
-// _tmp_199: expressions ['as' star_target]
+// _tmp_200: expressions ['as' star_target]
static void *
-_tmp_199_rule(Parser *p)
+_tmp_200_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32839,22 +32928,22 @@ _tmp_199_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_199[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]"));
+ D(fprintf(stderr, "%*c> _tmp_200[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]"));
void *_opt_var;
UNUSED(_opt_var); // Silence compiler warnings
expr_ty expressions_var;
if (
(expressions_var = expressions_rule(p)) // expressions
&&
- (_opt_var = _tmp_204_rule(p), 1) // ['as' star_target]
+ (_opt_var = _tmp_205_rule(p), 1) // ['as' star_target]
)
{
- D(fprintf(stderr, "%*c+ _tmp_199[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]"));
+ D(fprintf(stderr, "%*c+ _tmp_200[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expressions ['as' star_target]"));
_res = _PyPegen_dummy_name(p, expressions_var, _opt_var);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_199[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_200[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expressions ['as' star_target]"));
}
_res = NULL;
@@ -32863,9 +32952,9 @@ _tmp_199_rule(Parser *p)
return _res;
}
-// _tmp_200: assigment_expression | expression !':='
+// _tmp_201: assigment_expression | expression !':='
static void *
-_tmp_200_rule(Parser *p)
+_tmp_201_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32879,18 +32968,18 @@ _tmp_200_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_200[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "assigment_expression"));
+ D(fprintf(stderr, "%*c> _tmp_201[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "assigment_expression"));
expr_ty assigment_expression_var;
if (
(assigment_expression_var = assigment_expression_rule(p)) // assigment_expression
)
{
- D(fprintf(stderr, "%*c+ _tmp_200[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "assigment_expression"));
+ D(fprintf(stderr, "%*c+ _tmp_201[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "assigment_expression"));
_res = assigment_expression_var;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_200[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_201[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "assigment_expression"));
}
{ // expression !':='
@@ -32898,7 +32987,7 @@ _tmp_200_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_200[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression !':='"));
+ D(fprintf(stderr, "%*c> _tmp_201[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "expression !':='"));
expr_ty expression_var;
if (
(expression_var = expression_rule(p)) // expression
@@ -32906,12 +32995,12 @@ _tmp_200_rule(Parser *p)
_PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, 53) // token=':='
)
{
- D(fprintf(stderr, "%*c+ _tmp_200[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression !':='"));
+ D(fprintf(stderr, "%*c+ _tmp_201[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "expression !':='"));
_res = expression_var;
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_200[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_201[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "expression !':='"));
}
_res = NULL;
@@ -32920,9 +33009,9 @@ _tmp_200_rule(Parser *p)
return _res;
}
-// _tmp_201: 'as' star_target
+// _tmp_202: 'as' star_target
static void *
-_tmp_201_rule(Parser *p)
+_tmp_202_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32936,7 +33025,7 @@ _tmp_201_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_201[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target"));
+ D(fprintf(stderr, "%*c> _tmp_202[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target"));
Token * _keyword;
expr_ty star_target_var;
if (
@@ -32945,12 +33034,12 @@ _tmp_201_rule(Parser *p)
(star_target_var = star_target_rule(p)) // star_target
)
{
- D(fprintf(stderr, "%*c+ _tmp_201[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target"));
+ D(fprintf(stderr, "%*c+ _tmp_202[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target"));
_res = _PyPegen_dummy_name(p, _keyword, star_target_var);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_201[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_202[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'as' star_target"));
}
_res = NULL;
@@ -32959,9 +33048,9 @@ _tmp_201_rule(Parser *p)
return _res;
}
-// _tmp_202: 'as' star_target
+// _tmp_203: 'as' star_target
static void *
-_tmp_202_rule(Parser *p)
+_tmp_203_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -32975,7 +33064,7 @@ _tmp_202_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_202[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target"));
+ D(fprintf(stderr, "%*c> _tmp_203[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target"));
Token * _keyword;
expr_ty star_target_var;
if (
@@ -32984,12 +33073,12 @@ _tmp_202_rule(Parser *p)
(star_target_var = star_target_rule(p)) // star_target
)
{
- D(fprintf(stderr, "%*c+ _tmp_202[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target"));
+ D(fprintf(stderr, "%*c+ _tmp_203[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target"));
_res = _PyPegen_dummy_name(p, _keyword, star_target_var);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_202[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_203[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'as' star_target"));
}
_res = NULL;
@@ -32998,9 +33087,9 @@ _tmp_202_rule(Parser *p)
return _res;
}
-// _tmp_203: 'as' star_target
+// _tmp_204: 'as' star_target
static void *
-_tmp_203_rule(Parser *p)
+_tmp_204_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -33014,7 +33103,7 @@ _tmp_203_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_203[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target"));
+ D(fprintf(stderr, "%*c> _tmp_204[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target"));
Token * _keyword;
expr_ty star_target_var;
if (
@@ -33023,12 +33112,12 @@ _tmp_203_rule(Parser *p)
(star_target_var = star_target_rule(p)) // star_target
)
{
- D(fprintf(stderr, "%*c+ _tmp_203[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target"));
+ D(fprintf(stderr, "%*c+ _tmp_204[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target"));
_res = _PyPegen_dummy_name(p, _keyword, star_target_var);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_203[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_204[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'as' star_target"));
}
_res = NULL;
@@ -33037,9 +33126,9 @@ _tmp_203_rule(Parser *p)
return _res;
}
-// _tmp_204: 'as' star_target
+// _tmp_205: 'as' star_target
static void *
-_tmp_204_rule(Parser *p)
+_tmp_205_rule(Parser *p)
{
D(p->level++);
if (p->error_indicator) {
@@ -33053,7 +33142,7 @@ _tmp_204_rule(Parser *p)
D(p->level--);
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_204[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target"));
+ D(fprintf(stderr, "%*c> _tmp_205[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'as' star_target"));
Token * _keyword;
expr_ty star_target_var;
if (
@@ -33062,12 +33151,12 @@ _tmp_204_rule(Parser *p)
(star_target_var = star_target_rule(p)) // star_target
)
{
- D(fprintf(stderr, "%*c+ _tmp_204[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target"));
+ D(fprintf(stderr, "%*c+ _tmp_205[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'as' star_target"));
_res = _PyPegen_dummy_name(p, _keyword, star_target_var);
goto done;
}
p->mark = _mark;
- D(fprintf(stderr, "%*c%s _tmp_204[%d-%d]: %s failed!\n", p->level, ' ',
+ D(fprintf(stderr, "%*c%s _tmp_205[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'as' star_target"));
}
_res = NULL;