summaryrefslogtreecommitdiffstats
path: root/Parser/parser.c
diff options
context:
space:
mode:
authorPablo Galindo Salgado <Pablogsal@gmail.com>2023-07-26 15:34:15 (GMT)
committerGitHub <noreply@github.com>2023-07-26 15:34:15 (GMT)
commitda8f87b7ea421894c41dfc37f578e03409c5d280 (patch)
treeb48f7099f287b2269a25ab7476fae45c06182f05 /Parser/parser.c
parentb0202a4e5d6b629ba5acbc703e950f08ebaf07df (diff)
downloadcpython-da8f87b7ea421894c41dfc37f578e03409c5d280.zip
cpython-da8f87b7ea421894c41dfc37f578e03409c5d280.tar.gz
cpython-da8f87b7ea421894c41dfc37f578e03409c5d280.tar.bz2
gh-107015: Remove async_hacks from the tokenizer (#107018)
Diffstat (limited to 'Parser/parser.c')
-rw-r--r--Parser/parser.c624
1 files changed, 313 insertions, 311 deletions
diff --git a/Parser/parser.c b/Parser/parser.c
index f2ea8f5..44312cf 100644
--- a/Parser/parser.c
+++ b/Parser/parser.c
@@ -17,57 +17,59 @@ static KeywordToken *reserved_keywords[] = {
(KeywordToken[]) {{NULL, -1}},
(KeywordToken[]) {{NULL, -1}},
(KeywordToken[]) {
- {"if", 642},
- {"as", 640},
- {"in", 651},
- {"or", 574},
- {"is", 582},
+ {"if", 656},
+ {"as", 654},
+ {"in", 667},
+ {"or", 581},
+ {"is", 589},
{NULL, -1},
},
(KeywordToken[]) {
- {"del", 604},
- {"def", 652},
- {"for", 650},
- {"try", 624},
- {"and", 575},
- {"not", 581},
+ {"del", 613},
+ {"def", 669},
+ {"for", 666},
+ {"try", 638},
+ {"and", 582},
+ {"not", 588},
{NULL, -1},
},
(KeywordToken[]) {
- {"from", 608},
+ {"from", 618},
{"pass", 504},
- {"with", 615},
- {"elif", 644},
- {"else", 645},
- {"None", 602},
- {"True", 601},
+ {"with", 629},
+ {"elif", 658},
+ {"else", 659},
+ {"None", 611},
+ {"True", 610},
{NULL, -1},
},
(KeywordToken[]) {
- {"raise", 522},
- {"yield", 573},
+ {"raise", 525},
+ {"yield", 580},
{"break", 508},
- {"class", 654},
- {"while", 647},
- {"False", 603},
+ {"async", 668},
+ {"class", 671},
+ {"while", 661},
+ {"False", 612},
+ {"await", 590},
{NULL, -1},
},
(KeywordToken[]) {
- {"return", 519},
- {"import", 607},
- {"assert", 526},
- {"global", 523},
- {"except", 637},
- {"lambda", 600},
+ {"return", 522},
+ {"import", 617},
+ {"assert", 529},
+ {"global", 526},
+ {"except", 651},
+ {"lambda", 609},
{NULL, -1},
},
(KeywordToken[]) {
- {"finally", 633},
+ {"finally", 647},
{NULL, -1},
},
(KeywordToken[]) {
{"continue", 509},
- {"nonlocal", 524},
+ {"nonlocal", 527},
{NULL, -1},
},
};
@@ -1820,7 +1822,7 @@ simple_stmt_rule(Parser *p)
D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'return' return_stmt"));
stmt_ty return_stmt_var;
if (
- _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 519) // token='return'
+ _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 522) // token='return'
&&
(return_stmt_var = return_stmt_rule(p)) // return_stmt
)
@@ -1862,7 +1864,7 @@ simple_stmt_rule(Parser *p)
D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'raise' raise_stmt"));
stmt_ty raise_stmt_var;
if (
- _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 522) // token='raise'
+ _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 525) // token='raise'
&&
(raise_stmt_var = raise_stmt_rule(p)) // raise_stmt
)
@@ -1916,7 +1918,7 @@ simple_stmt_rule(Parser *p)
D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'del' del_stmt"));
stmt_ty del_stmt_var;
if (
- _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 604) // token='del'
+ _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 613) // token='del'
&&
(del_stmt_var = del_stmt_rule(p)) // del_stmt
)
@@ -1937,7 +1939,7 @@ simple_stmt_rule(Parser *p)
D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'yield' yield_stmt"));
stmt_ty yield_stmt_var;
if (
- _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 573) // token='yield'
+ _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 580) // token='yield'
&&
(yield_stmt_var = yield_stmt_rule(p)) // yield_stmt
)
@@ -1958,7 +1960,7 @@ simple_stmt_rule(Parser *p)
D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'assert' assert_stmt"));
stmt_ty assert_stmt_var;
if (
- _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 526) // token='assert'
+ _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 529) // token='assert'
&&
(assert_stmt_var = assert_stmt_rule(p)) // assert_stmt
)
@@ -2045,7 +2047,7 @@ simple_stmt_rule(Parser *p)
D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'global' global_stmt"));
stmt_ty global_stmt_var;
if (
- _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 523) // token='global'
+ _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 526) // token='global'
&&
(global_stmt_var = global_stmt_rule(p)) // global_stmt
)
@@ -2066,7 +2068,7 @@ simple_stmt_rule(Parser *p)
D(fprintf(stderr, "%*c> simple_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'nonlocal' nonlocal_stmt"));
stmt_ty nonlocal_stmt_var;
if (
- _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 524) // token='nonlocal'
+ _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 527) // token='nonlocal'
&&
(nonlocal_stmt_var = nonlocal_stmt_rule(p)) // nonlocal_stmt
)
@@ -2087,11 +2089,11 @@ simple_stmt_rule(Parser *p)
}
// compound_stmt:
-// | &('def' | '@' | ASYNC) function_def
+// | &('def' | '@' | 'async') function_def
// | &'if' if_stmt
// | &('class' | '@') class_def
-// | &('with' | ASYNC) with_stmt
-// | &('for' | ASYNC) for_stmt
+// | &('with' | 'async') with_stmt
+// | &('for' | 'async') for_stmt
// | &'try' try_stmt
// | &'while' while_stmt
// | match_stmt
@@ -2108,12 +2110,12 @@ compound_stmt_rule(Parser *p)
}
stmt_ty _res = NULL;
int _mark = p->mark;
- { // &('def' | '@' | ASYNC) function_def
+ { // &('def' | '@' | 'async') function_def
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> compound_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&('def' | '@' | ASYNC) function_def"));
+ D(fprintf(stderr, "%*c> compound_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&('def' | '@' | 'async') function_def"));
stmt_ty function_def_var;
if (
_PyPegen_lookahead(1, _tmp_8_rule, p)
@@ -2121,13 +2123,13 @@ compound_stmt_rule(Parser *p)
(function_def_var = function_def_rule(p)) // function_def
)
{
- D(fprintf(stderr, "%*c+ compound_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&('def' | '@' | ASYNC) function_def"));
+ D(fprintf(stderr, "%*c+ compound_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&('def' | '@' | 'async') function_def"));
_res = function_def_var;
goto done;
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s compound_stmt[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "&('def' | '@' | ASYNC) function_def"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "&('def' | '@' | 'async') function_def"));
}
{ // &'if' if_stmt
if (p->error_indicator) {
@@ -2137,7 +2139,7 @@ compound_stmt_rule(Parser *p)
D(fprintf(stderr, "%*c> compound_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'if' if_stmt"));
stmt_ty if_stmt_var;
if (
- _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 642) // token='if'
+ _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 656) // token='if'
&&
(if_stmt_var = if_stmt_rule(p)) // if_stmt
)
@@ -2171,12 +2173,12 @@ compound_stmt_rule(Parser *p)
D(fprintf(stderr, "%*c%s compound_stmt[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "&('class' | '@') class_def"));
}
- { // &('with' | ASYNC) with_stmt
+ { // &('with' | 'async') with_stmt
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> compound_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&('with' | ASYNC) with_stmt"));
+ D(fprintf(stderr, "%*c> compound_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&('with' | 'async') with_stmt"));
stmt_ty with_stmt_var;
if (
_PyPegen_lookahead(1, _tmp_10_rule, p)
@@ -2184,20 +2186,20 @@ compound_stmt_rule(Parser *p)
(with_stmt_var = with_stmt_rule(p)) // with_stmt
)
{
- D(fprintf(stderr, "%*c+ compound_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&('with' | ASYNC) with_stmt"));
+ D(fprintf(stderr, "%*c+ compound_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&('with' | 'async') with_stmt"));
_res = with_stmt_var;
goto done;
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s compound_stmt[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "&('with' | ASYNC) with_stmt"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "&('with' | 'async') with_stmt"));
}
- { // &('for' | ASYNC) for_stmt
+ { // &('for' | 'async') for_stmt
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> compound_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&('for' | ASYNC) for_stmt"));
+ D(fprintf(stderr, "%*c> compound_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&('for' | 'async') for_stmt"));
stmt_ty for_stmt_var;
if (
_PyPegen_lookahead(1, _tmp_11_rule, p)
@@ -2205,13 +2207,13 @@ compound_stmt_rule(Parser *p)
(for_stmt_var = for_stmt_rule(p)) // for_stmt
)
{
- D(fprintf(stderr, "%*c+ compound_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&('for' | ASYNC) for_stmt"));
+ D(fprintf(stderr, "%*c+ compound_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "&('for' | 'async') for_stmt"));
_res = for_stmt_var;
goto done;
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s compound_stmt[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "&('for' | ASYNC) for_stmt"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "&('for' | 'async') for_stmt"));
}
{ // &'try' try_stmt
if (p->error_indicator) {
@@ -2221,7 +2223,7 @@ compound_stmt_rule(Parser *p)
D(fprintf(stderr, "%*c> compound_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'try' try_stmt"));
stmt_ty try_stmt_var;
if (
- _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 624) // token='try'
+ _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 638) // token='try'
&&
(try_stmt_var = try_stmt_rule(p)) // try_stmt
)
@@ -2242,7 +2244,7 @@ compound_stmt_rule(Parser *p)
D(fprintf(stderr, "%*c> compound_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "&'while' while_stmt"));
stmt_ty while_stmt_var;
if (
- _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 647) // token='while'
+ _PyPegen_lookahead_with_int(1, _PyPegen_expect_token, p, 661) // token='while'
&&
(while_stmt_var = while_stmt_rule(p)) // while_stmt
)
@@ -2939,7 +2941,7 @@ return_stmt_rule(Parser *p)
Token * _keyword;
void *a;
if (
- (_keyword = _PyPegen_expect_token(p, 519)) // token='return'
+ (_keyword = _PyPegen_expect_token(p, 522)) // token='return'
&&
(a = star_expressions_rule(p), !p->error_indicator) // star_expressions?
)
@@ -3005,7 +3007,7 @@ raise_stmt_rule(Parser *p)
expr_ty a;
void *b;
if (
- (_keyword = _PyPegen_expect_token(p, 522)) // token='raise'
+ (_keyword = _PyPegen_expect_token(p, 525)) // token='raise'
&&
(a = expression_rule(p)) // expression
&&
@@ -3042,7 +3044,7 @@ raise_stmt_rule(Parser *p)
D(fprintf(stderr, "%*c> raise_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'raise'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 522)) // token='raise'
+ (_keyword = _PyPegen_expect_token(p, 525)) // token='raise'
)
{
D(fprintf(stderr, "%*c+ raise_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'raise'"));
@@ -3105,7 +3107,7 @@ global_stmt_rule(Parser *p)
Token * _keyword;
asdl_expr_seq* a;
if (
- (_keyword = _PyPegen_expect_token(p, 523)) // token='global'
+ (_keyword = _PyPegen_expect_token(p, 526)) // token='global'
&&
(a = (asdl_expr_seq*)_gather_19_rule(p)) // ','.NAME+
)
@@ -3170,7 +3172,7 @@ nonlocal_stmt_rule(Parser *p)
Token * _keyword;
asdl_expr_seq* a;
if (
- (_keyword = _PyPegen_expect_token(p, 524)) // token='nonlocal'
+ (_keyword = _PyPegen_expect_token(p, 527)) // token='nonlocal'
&&
(a = (asdl_expr_seq*)_gather_21_rule(p)) // ','.NAME+
)
@@ -3235,7 +3237,7 @@ del_stmt_rule(Parser *p)
Token * _keyword;
asdl_expr_seq* a;
if (
- (_keyword = _PyPegen_expect_token(p, 604)) // token='del'
+ (_keyword = _PyPegen_expect_token(p, 613)) // token='del'
&&
(a = del_targets_rule(p)) // del_targets
&&
@@ -3384,7 +3386,7 @@ assert_stmt_rule(Parser *p)
expr_ty a;
void *b;
if (
- (_keyword = _PyPegen_expect_token(p, 526)) // token='assert'
+ (_keyword = _PyPegen_expect_token(p, 529)) // token='assert'
&&
(a = expression_rule(p)) // expression
&&
@@ -3528,7 +3530,7 @@ import_name_rule(Parser *p)
Token * _keyword;
asdl_alias_seq* a;
if (
- (_keyword = _PyPegen_expect_token(p, 607)) // token='import'
+ (_keyword = _PyPegen_expect_token(p, 617)) // token='import'
&&
(a = dotted_as_names_rule(p)) // dotted_as_names
)
@@ -3598,13 +3600,13 @@ import_from_rule(Parser *p)
expr_ty b;
asdl_alias_seq* c;
if (
- (_keyword = _PyPegen_expect_token(p, 608)) // token='from'
+ (_keyword = _PyPegen_expect_token(p, 618)) // token='from'
&&
(a = _loop0_25_rule(p)) // (('.' | '...'))*
&&
(b = dotted_name_rule(p)) // dotted_name
&&
- (_keyword_1 = _PyPegen_expect_token(p, 607)) // token='import'
+ (_keyword_1 = _PyPegen_expect_token(p, 617)) // token='import'
&&
(c = import_from_targets_rule(p)) // import_from_targets
)
@@ -3642,11 +3644,11 @@ import_from_rule(Parser *p)
asdl_seq * a;
asdl_alias_seq* b;
if (
- (_keyword = _PyPegen_expect_token(p, 608)) // token='from'
+ (_keyword = _PyPegen_expect_token(p, 618)) // token='from'
&&
(a = _loop1_26_rule(p)) // (('.' | '...'))+
&&
- (_keyword_1 = _PyPegen_expect_token(p, 607)) // token='import'
+ (_keyword_1 = _PyPegen_expect_token(p, 617)) // token='import'
&&
(b = import_from_targets_rule(p)) // import_from_targets
)
@@ -4406,7 +4408,7 @@ class_def_raw_rule(Parser *p)
asdl_stmt_seq* c;
void *t;
if (
- (_keyword = _PyPegen_expect_token(p, 654)) // token='class'
+ (_keyword = _PyPegen_expect_token(p, 671)) // token='class'
&&
(a = _PyPegen_name_token(p)) // NAME
&&
@@ -4516,7 +4518,7 @@ function_def_rule(Parser *p)
// function_def_raw:
// | invalid_def_raw
// | 'def' NAME type_params? &&'(' params? ')' ['->' expression] &&':' func_type_comment? block
-// | ASYNC 'def' NAME type_params? &&'(' params? ')' ['->' expression] &&':' func_type_comment? block
+// | 'async' 'def' NAME type_params? &&'(' params? ')' ['->' expression] &&':' func_type_comment? block
static stmt_ty
function_def_raw_rule(Parser *p)
{
@@ -4575,7 +4577,7 @@ function_def_raw_rule(Parser *p)
void *t;
void *tc;
if (
- (_keyword = _PyPegen_expect_token(p, 652)) // token='def'
+ (_keyword = _PyPegen_expect_token(p, 669)) // token='def'
&&
(n = _PyPegen_name_token(p)) // NAME
&&
@@ -4618,27 +4620,27 @@ function_def_raw_rule(Parser *p)
D(fprintf(stderr, "%*c%s function_def_raw[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'def' NAME type_params? &&'(' params? ')' ['->' expression] &&':' func_type_comment? block"));
}
- { // ASYNC 'def' NAME type_params? &&'(' params? ')' ['->' expression] &&':' func_type_comment? block
+ { // 'async' 'def' NAME type_params? &&'(' params? ')' ['->' expression] &&':' func_type_comment? block
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> function_def_raw[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC 'def' NAME type_params? &&'(' params? ')' ['->' expression] &&':' func_type_comment? block"));
+ D(fprintf(stderr, "%*c> function_def_raw[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'async' 'def' NAME type_params? &&'(' params? ')' ['->' expression] &&':' func_type_comment? block"));
Token * _keyword;
+ Token * _keyword_1;
Token * _literal;
Token * _literal_1;
Token * _literal_2;
void *a;
- Token * async_var;
asdl_stmt_seq* b;
expr_ty n;
void *params;
void *t;
void *tc;
if (
- (async_var = _PyPegen_expect_token(p, ASYNC)) // token='ASYNC'
+ (_keyword = _PyPegen_expect_token(p, 668)) // token='async'
&&
- (_keyword = _PyPegen_expect_token(p, 652)) // token='def'
+ (_keyword_1 = _PyPegen_expect_token(p, 669)) // token='def'
&&
(n = _PyPegen_name_token(p)) // NAME
&&
@@ -4659,7 +4661,7 @@ function_def_raw_rule(Parser *p)
(b = block_rule(p)) // block
)
{
- D(fprintf(stderr, "%*c+ function_def_raw[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC 'def' NAME type_params? &&'(' params? ')' ['->' expression] &&':' func_type_comment? block"));
+ D(fprintf(stderr, "%*c+ function_def_raw[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'async' 'def' NAME type_params? &&'(' params? ')' ['->' expression] &&':' func_type_comment? block"));
Token *_token = _PyPegen_get_last_nonnwhitespace_token(p);
if (_token == NULL) {
p->level--;
@@ -4679,7 +4681,7 @@ function_def_raw_rule(Parser *p)
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s function_def_raw[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "ASYNC 'def' NAME type_params? &&'(' params? ')' ['->' expression] &&':' func_type_comment? block"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'async' 'def' NAME type_params? &&'(' params? ')' ['->' expression] &&':' func_type_comment? block"));
}
_res = NULL;
done:
@@ -5992,7 +5994,7 @@ if_stmt_rule(Parser *p)
asdl_stmt_seq* b;
stmt_ty c;
if (
- (_keyword = _PyPegen_expect_token(p, 642)) // token='if'
+ (_keyword = _PyPegen_expect_token(p, 656)) // token='if'
&&
(a = named_expression_rule(p)) // named_expression
&&
@@ -6037,7 +6039,7 @@ if_stmt_rule(Parser *p)
asdl_stmt_seq* b;
void *c;
if (
- (_keyword = _PyPegen_expect_token(p, 642)) // token='if'
+ (_keyword = _PyPegen_expect_token(p, 656)) // token='if'
&&
(a = named_expression_rule(p)) // named_expression
&&
@@ -6133,7 +6135,7 @@ elif_stmt_rule(Parser *p)
asdl_stmt_seq* b;
stmt_ty c;
if (
- (_keyword = _PyPegen_expect_token(p, 644)) // token='elif'
+ (_keyword = _PyPegen_expect_token(p, 658)) // token='elif'
&&
(a = named_expression_rule(p)) // named_expression
&&
@@ -6178,7 +6180,7 @@ elif_stmt_rule(Parser *p)
asdl_stmt_seq* b;
void *c;
if (
- (_keyword = _PyPegen_expect_token(p, 644)) // token='elif'
+ (_keyword = _PyPegen_expect_token(p, 658)) // token='elif'
&&
(a = named_expression_rule(p)) // named_expression
&&
@@ -6260,7 +6262,7 @@ else_block_rule(Parser *p)
Token * _literal;
asdl_stmt_seq* b;
if (
- (_keyword = _PyPegen_expect_token(p, 645)) // token='else'
+ (_keyword = _PyPegen_expect_token(p, 659)) // token='else'
&&
(_literal = _PyPegen_expect_forced_token(p, 11, ":")) // forced_token=':'
&&
@@ -6340,7 +6342,7 @@ while_stmt_rule(Parser *p)
asdl_stmt_seq* b;
void *c;
if (
- (_keyword = _PyPegen_expect_token(p, 647)) // token='while'
+ (_keyword = _PyPegen_expect_token(p, 661)) // token='while'
&&
(a = named_expression_rule(p)) // named_expression
&&
@@ -6382,7 +6384,7 @@ while_stmt_rule(Parser *p)
// for_stmt:
// | invalid_for_stmt
// | 'for' star_targets 'in' ~ star_expressions ':' TYPE_COMMENT? block else_block?
-// | ASYNC 'for' star_targets 'in' ~ star_expressions ':' TYPE_COMMENT? block else_block?
+// | 'async' 'for' star_targets 'in' ~ star_expressions ':' TYPE_COMMENT? block else_block?
// | invalid_for_target
static stmt_ty
for_stmt_rule(Parser *p)
@@ -6441,11 +6443,11 @@ for_stmt_rule(Parser *p)
expr_ty t;
void *tc;
if (
- (_keyword = _PyPegen_expect_token(p, 650)) // token='for'
+ (_keyword = _PyPegen_expect_token(p, 666)) // token='for'
&&
(t = star_targets_rule(p)) // star_targets
&&
- (_keyword_1 = _PyPegen_expect_token(p, 651)) // token='in'
+ (_keyword_1 = _PyPegen_expect_token(p, 667)) // token='in'
&&
(_cut_var = 1)
&&
@@ -6486,30 +6488,30 @@ for_stmt_rule(Parser *p)
return NULL;
}
}
- { // ASYNC 'for' star_targets 'in' ~ star_expressions ':' TYPE_COMMENT? block else_block?
+ { // 'async' 'for' star_targets 'in' ~ star_expressions ':' TYPE_COMMENT? block else_block?
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> for_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC 'for' star_targets 'in' ~ star_expressions ':' TYPE_COMMENT? block else_block?"));
+ D(fprintf(stderr, "%*c> for_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'async' 'for' star_targets 'in' ~ star_expressions ':' TYPE_COMMENT? block else_block?"));
int _cut_var = 0;
Token * _keyword;
Token * _keyword_1;
+ Token * _keyword_2;
Token * _literal;
- Token * async_var;
asdl_stmt_seq* b;
void *el;
expr_ty ex;
expr_ty t;
void *tc;
if (
- (async_var = _PyPegen_expect_token(p, ASYNC)) // token='ASYNC'
+ (_keyword = _PyPegen_expect_token(p, 668)) // token='async'
&&
- (_keyword = _PyPegen_expect_token(p, 650)) // token='for'
+ (_keyword_1 = _PyPegen_expect_token(p, 666)) // token='for'
&&
(t = star_targets_rule(p)) // star_targets
&&
- (_keyword_1 = _PyPegen_expect_token(p, 651)) // token='in'
+ (_keyword_2 = _PyPegen_expect_token(p, 667)) // token='in'
&&
(_cut_var = 1)
&&
@@ -6524,7 +6526,7 @@ for_stmt_rule(Parser *p)
(el = else_block_rule(p), !p->error_indicator) // else_block?
)
{
- D(fprintf(stderr, "%*c+ for_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC 'for' star_targets 'in' ~ star_expressions ':' TYPE_COMMENT? block else_block?"));
+ D(fprintf(stderr, "%*c+ for_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'async' 'for' star_targets 'in' ~ star_expressions ':' TYPE_COMMENT? block else_block?"));
Token *_token = _PyPegen_get_last_nonnwhitespace_token(p);
if (_token == NULL) {
p->level--;
@@ -6544,7 +6546,7 @@ for_stmt_rule(Parser *p)
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s for_stmt[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "ASYNC 'for' star_targets 'in' ~ star_expressions ':' TYPE_COMMENT? block else_block?"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'async' 'for' star_targets 'in' ~ star_expressions ':' TYPE_COMMENT? block else_block?"));
if (_cut_var) {
p->level--;
return NULL;
@@ -6579,8 +6581,8 @@ for_stmt_rule(Parser *p)
// | invalid_with_stmt_indent
// | 'with' '(' ','.with_item+ ','? ')' ':' block
// | 'with' ','.with_item+ ':' TYPE_COMMENT? block
-// | ASYNC 'with' '(' ','.with_item+ ','? ')' ':' block
-// | ASYNC 'with' ','.with_item+ ':' TYPE_COMMENT? block
+// | 'async' 'with' '(' ','.with_item+ ','? ')' ':' block
+// | 'async' 'with' ','.with_item+ ':' TYPE_COMMENT? block
// | invalid_with_stmt
static stmt_ty
with_stmt_rule(Parser *p)
@@ -6638,7 +6640,7 @@ with_stmt_rule(Parser *p)
asdl_withitem_seq* a;
asdl_stmt_seq* b;
if (
- (_keyword = _PyPegen_expect_token(p, 615)) // token='with'
+ (_keyword = _PyPegen_expect_token(p, 629)) // token='with'
&&
(_literal = _PyPegen_expect_token(p, 7)) // token='('
&&
@@ -6687,7 +6689,7 @@ with_stmt_rule(Parser *p)
asdl_stmt_seq* b;
void *tc;
if (
- (_keyword = _PyPegen_expect_token(p, 615)) // token='with'
+ (_keyword = _PyPegen_expect_token(p, 629)) // token='with'
&&
(a = (asdl_withitem_seq*)_gather_54_rule(p)) // ','.with_item+
&&
@@ -6720,25 +6722,25 @@ with_stmt_rule(Parser *p)
D(fprintf(stderr, "%*c%s with_stmt[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'with' ','.with_item+ ':' TYPE_COMMENT? block"));
}
- { // ASYNC 'with' '(' ','.with_item+ ','? ')' ':' block
+ { // 'async' 'with' '(' ','.with_item+ ','? ')' ':' block
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> with_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC 'with' '(' ','.with_item+ ','? ')' ':' block"));
+ D(fprintf(stderr, "%*c> with_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'async' 'with' '(' ','.with_item+ ','? ')' ':' block"));
Token * _keyword;
+ Token * _keyword_1;
Token * _literal;
Token * _literal_1;
Token * _literal_2;
void *_opt_var;
UNUSED(_opt_var); // Silence compiler warnings
asdl_withitem_seq* a;
- Token * async_var;
asdl_stmt_seq* b;
if (
- (async_var = _PyPegen_expect_token(p, ASYNC)) // token='ASYNC'
+ (_keyword = _PyPegen_expect_token(p, 668)) // token='async'
&&
- (_keyword = _PyPegen_expect_token(p, 615)) // token='with'
+ (_keyword_1 = _PyPegen_expect_token(p, 629)) // token='with'
&&
(_literal = _PyPegen_expect_token(p, 7)) // token='('
&&
@@ -6753,7 +6755,7 @@ with_stmt_rule(Parser *p)
(b = block_rule(p)) // block
)
{
- D(fprintf(stderr, "%*c+ with_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC 'with' '(' ','.with_item+ ','? ')' ':' block"));
+ D(fprintf(stderr, "%*c+ with_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'async' 'with' '(' ','.with_item+ ','? ')' ':' block"));
Token *_token = _PyPegen_get_last_nonnwhitespace_token(p);
if (_token == NULL) {
p->level--;
@@ -6773,24 +6775,24 @@ with_stmt_rule(Parser *p)
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s with_stmt[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "ASYNC 'with' '(' ','.with_item+ ','? ')' ':' block"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'async' 'with' '(' ','.with_item+ ','? ')' ':' block"));
}
- { // ASYNC 'with' ','.with_item+ ':' TYPE_COMMENT? block
+ { // 'async' 'with' ','.with_item+ ':' TYPE_COMMENT? block
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> with_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC 'with' ','.with_item+ ':' TYPE_COMMENT? block"));
+ D(fprintf(stderr, "%*c> with_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'async' 'with' ','.with_item+ ':' TYPE_COMMENT? block"));
Token * _keyword;
+ Token * _keyword_1;
Token * _literal;
asdl_withitem_seq* a;
- Token * async_var;
asdl_stmt_seq* b;
void *tc;
if (
- (async_var = _PyPegen_expect_token(p, ASYNC)) // token='ASYNC'
+ (_keyword = _PyPegen_expect_token(p, 668)) // token='async'
&&
- (_keyword = _PyPegen_expect_token(p, 615)) // token='with'
+ (_keyword_1 = _PyPegen_expect_token(p, 629)) // token='with'
&&
(a = (asdl_withitem_seq*)_gather_58_rule(p)) // ','.with_item+
&&
@@ -6801,7 +6803,7 @@ with_stmt_rule(Parser *p)
(b = block_rule(p)) // block
)
{
- D(fprintf(stderr, "%*c+ with_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC 'with' ','.with_item+ ':' TYPE_COMMENT? block"));
+ D(fprintf(stderr, "%*c+ with_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'async' 'with' ','.with_item+ ':' TYPE_COMMENT? block"));
Token *_token = _PyPegen_get_last_nonnwhitespace_token(p);
if (_token == NULL) {
p->level--;
@@ -6821,7 +6823,7 @@ with_stmt_rule(Parser *p)
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s with_stmt[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "ASYNC 'with' ','.with_item+ ':' TYPE_COMMENT? block"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'async' 'with' ','.with_item+ ':' TYPE_COMMENT? block"));
}
if (p->call_invalid_rules) { // invalid_with_stmt
if (p->error_indicator) {
@@ -6877,7 +6879,7 @@ with_item_rule(Parser *p)
if (
(e = expression_rule(p)) // expression
&&
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(t = star_target_rule(p)) // star_target
&&
@@ -7003,7 +7005,7 @@ try_stmt_rule(Parser *p)
asdl_stmt_seq* b;
asdl_stmt_seq* f;
if (
- (_keyword = _PyPegen_expect_token(p, 624)) // token='try'
+ (_keyword = _PyPegen_expect_token(p, 638)) // token='try'
&&
(_literal = _PyPegen_expect_forced_token(p, 11, ":")) // forced_token=':'
&&
@@ -7047,7 +7049,7 @@ try_stmt_rule(Parser *p)
asdl_excepthandler_seq* ex;
void *f;
if (
- (_keyword = _PyPegen_expect_token(p, 624)) // token='try'
+ (_keyword = _PyPegen_expect_token(p, 638)) // token='try'
&&
(_literal = _PyPegen_expect_forced_token(p, 11, ":")) // forced_token=':'
&&
@@ -7095,7 +7097,7 @@ try_stmt_rule(Parser *p)
asdl_excepthandler_seq* ex;
void *f;
if (
- (_keyword = _PyPegen_expect_token(p, 624)) // token='try'
+ (_keyword = _PyPegen_expect_token(p, 638)) // token='try'
&&
(_literal = _PyPegen_expect_forced_token(p, 11, ":")) // forced_token=':'
&&
@@ -7194,7 +7196,7 @@ except_block_rule(Parser *p)
expr_ty e;
void *t;
if (
- (_keyword = _PyPegen_expect_token(p, 637)) // token='except'
+ (_keyword = _PyPegen_expect_token(p, 651)) // token='except'
&&
(e = expression_rule(p)) // expression
&&
@@ -7237,7 +7239,7 @@ except_block_rule(Parser *p)
Token * _literal;
asdl_stmt_seq* b;
if (
- (_keyword = _PyPegen_expect_token(p, 637)) // token='except'
+ (_keyword = _PyPegen_expect_token(p, 651)) // token='except'
&&
(_literal = _PyPegen_expect_token(p, 11)) // token=':'
&&
@@ -7349,7 +7351,7 @@ except_star_block_rule(Parser *p)
expr_ty e;
void *t;
if (
- (_keyword = _PyPegen_expect_token(p, 637)) // token='except'
+ (_keyword = _PyPegen_expect_token(p, 651)) // token='except'
&&
(_literal = _PyPegen_expect_token(p, 16)) // token='*'
&&
@@ -7452,7 +7454,7 @@ finally_block_rule(Parser *p)
Token * _literal;
asdl_stmt_seq* a;
if (
- (_keyword = _PyPegen_expect_token(p, 633)) // token='finally'
+ (_keyword = _PyPegen_expect_token(p, 647)) // token='finally'
&&
(_literal = _PyPegen_expect_forced_token(p, 11, ":")) // forced_token=':'
&&
@@ -7764,7 +7766,7 @@ guard_rule(Parser *p)
Token * _keyword;
expr_ty guard;
if (
- (_keyword = _PyPegen_expect_token(p, 642)) // token='if'
+ (_keyword = _PyPegen_expect_token(p, 656)) // token='if'
&&
(guard = named_expression_rule(p)) // named_expression
)
@@ -7962,7 +7964,7 @@ as_pattern_rule(Parser *p)
if (
(pattern = or_pattern_rule(p)) // or_pattern
&&
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(target = pattern_capture_target_rule(p)) // pattern_capture_target
)
@@ -8399,7 +8401,7 @@ literal_pattern_rule(Parser *p)
D(fprintf(stderr, "%*c> literal_pattern[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'None'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 602)) // token='None'
+ (_keyword = _PyPegen_expect_token(p, 611)) // token='None'
)
{
D(fprintf(stderr, "%*c+ literal_pattern[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'None'"));
@@ -8432,7 +8434,7 @@ literal_pattern_rule(Parser *p)
D(fprintf(stderr, "%*c> literal_pattern[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'True'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 601)) // token='True'
+ (_keyword = _PyPegen_expect_token(p, 610)) // token='True'
)
{
D(fprintf(stderr, "%*c+ literal_pattern[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'True'"));
@@ -8465,7 +8467,7 @@ literal_pattern_rule(Parser *p)
D(fprintf(stderr, "%*c> literal_pattern[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'False'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 603)) // token='False'
+ (_keyword = _PyPegen_expect_token(p, 612)) // token='False'
)
{
D(fprintf(stderr, "%*c+ literal_pattern[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'False'"));
@@ -8592,7 +8594,7 @@ literal_expr_rule(Parser *p)
D(fprintf(stderr, "%*c> literal_expr[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'None'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 602)) // token='None'
+ (_keyword = _PyPegen_expect_token(p, 611)) // token='None'
)
{
D(fprintf(stderr, "%*c+ literal_expr[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'None'"));
@@ -8625,7 +8627,7 @@ literal_expr_rule(Parser *p)
D(fprintf(stderr, "%*c> literal_expr[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'True'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 601)) // token='True'
+ (_keyword = _PyPegen_expect_token(p, 610)) // token='True'
)
{
D(fprintf(stderr, "%*c+ literal_expr[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'True'"));
@@ -8658,7 +8660,7 @@ literal_expr_rule(Parser *p)
D(fprintf(stderr, "%*c> literal_expr[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'False'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 603)) // token='False'
+ (_keyword = _PyPegen_expect_token(p, 612)) // token='False'
)
{
D(fprintf(stderr, "%*c+ literal_expr[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'False'"));
@@ -11222,11 +11224,11 @@ expression_rule(Parser *p)
if (
(a = disjunction_rule(p)) // disjunction
&&
- (_keyword = _PyPegen_expect_token(p, 642)) // token='if'
+ (_keyword = _PyPegen_expect_token(p, 656)) // token='if'
&&
(b = disjunction_rule(p)) // disjunction
&&
- (_keyword_1 = _PyPegen_expect_token(p, 645)) // token='else'
+ (_keyword_1 = _PyPegen_expect_token(p, 659)) // token='else'
&&
(c = expression_rule(p)) // expression
)
@@ -11331,9 +11333,9 @@ yield_expr_rule(Parser *p)
Token * _keyword_1;
expr_ty a;
if (
- (_keyword = _PyPegen_expect_token(p, 573)) // token='yield'
+ (_keyword = _PyPegen_expect_token(p, 580)) // token='yield'
&&
- (_keyword_1 = _PyPegen_expect_token(p, 608)) // token='from'
+ (_keyword_1 = _PyPegen_expect_token(p, 618)) // token='from'
&&
(a = expression_rule(p)) // expression
)
@@ -11369,7 +11371,7 @@ yield_expr_rule(Parser *p)
Token * _keyword;
void *a;
if (
- (_keyword = _PyPegen_expect_token(p, 573)) // token='yield'
+ (_keyword = _PyPegen_expect_token(p, 580)) // token='yield'
&&
(a = star_expressions_rule(p), !p->error_indicator) // star_expressions?
)
@@ -12118,7 +12120,7 @@ inversion_rule(Parser *p)
Token * _keyword;
expr_ty a;
if (
- (_keyword = _PyPegen_expect_token(p, 581)) // token='not'
+ (_keyword = _PyPegen_expect_token(p, 588)) // token='not'
&&
(a = inversion_rule(p)) // inversion
)
@@ -12781,9 +12783,9 @@ notin_bitwise_or_rule(Parser *p)
Token * _keyword_1;
expr_ty a;
if (
- (_keyword = _PyPegen_expect_token(p, 581)) // token='not'
+ (_keyword = _PyPegen_expect_token(p, 588)) // token='not'
&&
- (_keyword_1 = _PyPegen_expect_token(p, 651)) // token='in'
+ (_keyword_1 = _PyPegen_expect_token(p, 667)) // token='in'
&&
(a = bitwise_or_rule(p)) // bitwise_or
)
@@ -12830,7 +12832,7 @@ in_bitwise_or_rule(Parser *p)
Token * _keyword;
expr_ty a;
if (
- (_keyword = _PyPegen_expect_token(p, 651)) // token='in'
+ (_keyword = _PyPegen_expect_token(p, 667)) // token='in'
&&
(a = bitwise_or_rule(p)) // bitwise_or
)
@@ -12878,9 +12880,9 @@ isnot_bitwise_or_rule(Parser *p)
Token * _keyword_1;
expr_ty a;
if (
- (_keyword = _PyPegen_expect_token(p, 582)) // token='is'
+ (_keyword = _PyPegen_expect_token(p, 589)) // token='is'
&&
- (_keyword_1 = _PyPegen_expect_token(p, 581)) // token='not'
+ (_keyword_1 = _PyPegen_expect_token(p, 588)) // token='not'
&&
(a = bitwise_or_rule(p)) // bitwise_or
)
@@ -12927,7 +12929,7 @@ is_bitwise_or_rule(Parser *p)
Token * _keyword;
expr_ty a;
if (
- (_keyword = _PyPegen_expect_token(p, 582)) // token='is'
+ (_keyword = _PyPegen_expect_token(p, 589)) // token='is'
&&
(a = bitwise_or_rule(p)) // bitwise_or
)
@@ -14183,7 +14185,7 @@ power_rule(Parser *p)
return _res;
}
-// await_primary: AWAIT primary | primary
+// await_primary: 'await' primary | primary
static expr_ty
await_primary_rule(Parser *p)
{
@@ -14210,21 +14212,21 @@ await_primary_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
- { // AWAIT primary
+ { // 'await' primary
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> await_primary[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "AWAIT primary"));
+ D(fprintf(stderr, "%*c> await_primary[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'await' primary"));
+ Token * _keyword;
expr_ty a;
- Token * await_var;
if (
- (await_var = _PyPegen_expect_token(p, AWAIT)) // token='AWAIT'
+ (_keyword = _PyPegen_expect_token(p, 590)) // token='await'
&&
(a = primary_rule(p)) // primary
)
{
- D(fprintf(stderr, "%*c+ await_primary[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "AWAIT primary"));
+ D(fprintf(stderr, "%*c+ await_primary[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'await' primary"));
Token *_token = _PyPegen_get_last_nonnwhitespace_token(p);
if (_token == NULL) {
p->level--;
@@ -14244,7 +14246,7 @@ await_primary_rule(Parser *p)
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s await_primary[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "AWAIT primary"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'await' primary"));
}
{ // primary
if (p->error_indicator) {
@@ -14768,7 +14770,7 @@ atom_rule(Parser *p)
D(fprintf(stderr, "%*c> atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'True'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 601)) // token='True'
+ (_keyword = _PyPegen_expect_token(p, 610)) // token='True'
)
{
D(fprintf(stderr, "%*c+ atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'True'"));
@@ -14801,7 +14803,7 @@ atom_rule(Parser *p)
D(fprintf(stderr, "%*c> atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'False'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 603)) // token='False'
+ (_keyword = _PyPegen_expect_token(p, 612)) // token='False'
)
{
D(fprintf(stderr, "%*c+ atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'False'"));
@@ -14834,7 +14836,7 @@ atom_rule(Parser *p)
D(fprintf(stderr, "%*c> atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'None'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 602)) // token='None'
+ (_keyword = _PyPegen_expect_token(p, 611)) // token='None'
)
{
D(fprintf(stderr, "%*c+ atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'None'"));
@@ -15104,7 +15106,7 @@ lambdef_rule(Parser *p)
void *a;
expr_ty b;
if (
- (_keyword = _PyPegen_expect_token(p, 600)) // token='lambda'
+ (_keyword = _PyPegen_expect_token(p, 609)) // token='lambda'
&&
(a = lambda_params_rule(p), !p->error_indicator) // lambda_params?
&&
@@ -16981,7 +16983,7 @@ for_if_clauses_rule(Parser *p)
}
// for_if_clause:
-// | ASYNC 'for' star_targets 'in' ~ disjunction (('if' disjunction))*
+// | 'async' 'for' star_targets 'in' ~ disjunction (('if' disjunction))*
// | 'for' star_targets 'in' ~ disjunction (('if' disjunction))*
// | invalid_for_target
static comprehension_ty
@@ -16997,27 +16999,27 @@ for_if_clause_rule(Parser *p)
}
comprehension_ty _res = NULL;
int _mark = p->mark;
- { // ASYNC 'for' star_targets 'in' ~ disjunction (('if' disjunction))*
+ { // 'async' 'for' star_targets 'in' ~ disjunction (('if' disjunction))*
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> for_if_clause[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC 'for' star_targets 'in' ~ disjunction (('if' disjunction))*"));
+ D(fprintf(stderr, "%*c> for_if_clause[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'async' 'for' star_targets 'in' ~ disjunction (('if' disjunction))*"));
int _cut_var = 0;
Token * _keyword;
Token * _keyword_1;
+ Token * _keyword_2;
expr_ty a;
- Token * async_var;
expr_ty b;
asdl_expr_seq* c;
if (
- (async_var = _PyPegen_expect_token(p, ASYNC)) // token='ASYNC'
+ (_keyword = _PyPegen_expect_token(p, 668)) // token='async'
&&
- (_keyword = _PyPegen_expect_token(p, 650)) // token='for'
+ (_keyword_1 = _PyPegen_expect_token(p, 666)) // token='for'
&&
(a = star_targets_rule(p)) // star_targets
&&
- (_keyword_1 = _PyPegen_expect_token(p, 651)) // token='in'
+ (_keyword_2 = _PyPegen_expect_token(p, 667)) // token='in'
&&
(_cut_var = 1)
&&
@@ -17026,7 +17028,7 @@ for_if_clause_rule(Parser *p)
(c = (asdl_expr_seq*)_loop0_120_rule(p)) // (('if' disjunction))*
)
{
- D(fprintf(stderr, "%*c+ for_if_clause[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC 'for' star_targets 'in' ~ disjunction (('if' disjunction))*"));
+ D(fprintf(stderr, "%*c+ for_if_clause[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'async' 'for' star_targets 'in' ~ disjunction (('if' disjunction))*"));
_res = CHECK_VERSION ( comprehension_ty , 6 , "Async comprehensions are" , _PyAST_comprehension ( a , b , c , 1 , p -> arena ) );
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -17037,7 +17039,7 @@ for_if_clause_rule(Parser *p)
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s for_if_clause[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "ASYNC 'for' star_targets 'in' ~ disjunction (('if' disjunction))*"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'async' 'for' star_targets 'in' ~ disjunction (('if' disjunction))*"));
if (_cut_var) {
p->level--;
return NULL;
@@ -17056,11 +17058,11 @@ for_if_clause_rule(Parser *p)
expr_ty b;
asdl_expr_seq* c;
if (
- (_keyword = _PyPegen_expect_token(p, 650)) // token='for'
+ (_keyword = _PyPegen_expect_token(p, 666)) // token='for'
&&
(a = star_targets_rule(p)) // star_targets
&&
- (_keyword_1 = _PyPegen_expect_token(p, 651)) // token='in'
+ (_keyword_1 = _PyPegen_expect_token(p, 667)) // token='in'
&&
(_cut_var = 1)
&&
@@ -20349,11 +20351,11 @@ expression_without_invalid_rule(Parser *p)
if (
(a = disjunction_rule(p)) // disjunction
&&
- (_keyword = _PyPegen_expect_token(p, 642)) // token='if'
+ (_keyword = _PyPegen_expect_token(p, 656)) // token='if'
&&
(b = disjunction_rule(p)) // disjunction
&&
- (_keyword_1 = _PyPegen_expect_token(p, 645)) // token='else'
+ (_keyword_1 = _PyPegen_expect_token(p, 659)) // token='else'
&&
(c = expression_rule(p)) // expression
)
@@ -20536,7 +20538,7 @@ invalid_expression_rule(Parser *p)
if (
(a = disjunction_rule(p)) // disjunction
&&
- (_keyword = _PyPegen_expect_token(p, 642)) // token='if'
+ (_keyword = _PyPegen_expect_token(p, 656)) // token='if'
&&
(b = disjunction_rule(p)) // disjunction
&&
@@ -20567,7 +20569,7 @@ invalid_expression_rule(Parser *p)
Token * a;
Token * b;
if (
- (a = _PyPegen_expect_token(p, 600)) // token='lambda'
+ (a = _PyPegen_expect_token(p, 609)) // token='lambda'
&&
(_opt_var = lambda_params_rule(p), !p->error_indicator) // lambda_params?
&&
@@ -21042,7 +21044,7 @@ invalid_del_stmt_rule(Parser *p)
Token * _keyword;
expr_ty a;
if (
- (_keyword = _PyPegen_expect_token(p, 604)) // token='del'
+ (_keyword = _PyPegen_expect_token(p, 613)) // token='del'
&&
(a = star_expressions_rule(p)) // star_expressions
)
@@ -22492,7 +22494,7 @@ invalid_with_item_rule(Parser *p)
if (
(expression_var = expression_rule(p)) // expression
&&
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(a = expression_rule(p)) // expression
&&
@@ -22518,7 +22520,7 @@ invalid_with_item_rule(Parser *p)
return _res;
}
-// invalid_for_target: ASYNC? 'for' star_expressions
+// invalid_for_target: 'async'? 'for' star_expressions
static void *
invalid_for_target_rule(Parser *p)
{
@@ -22532,25 +22534,25 @@ invalid_for_target_rule(Parser *p)
}
void * _res = NULL;
int _mark = p->mark;
- { // ASYNC? 'for' star_expressions
+ { // 'async'? 'for' star_expressions
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> invalid_for_target[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC? 'for' star_expressions"));
+ D(fprintf(stderr, "%*c> invalid_for_target[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'async'? 'for' star_expressions"));
Token * _keyword;
void *_opt_var;
UNUSED(_opt_var); // Silence compiler warnings
expr_ty a;
if (
- (_opt_var = _PyPegen_expect_token(p, ASYNC), !p->error_indicator) // ASYNC?
+ (_opt_var = _PyPegen_expect_token(p, 668), !p->error_indicator) // 'async'?
&&
- (_keyword = _PyPegen_expect_token(p, 650)) // token='for'
+ (_keyword = _PyPegen_expect_token(p, 666)) // token='for'
&&
(a = star_expressions_rule(p)) // star_expressions
)
{
- D(fprintf(stderr, "%*c+ invalid_for_target[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC? 'for' star_expressions"));
+ D(fprintf(stderr, "%*c+ invalid_for_target[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'async'? 'for' star_expressions"));
_res = RAISE_SYNTAX_ERROR_INVALID_TARGET ( FOR_TARGETS , a );
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -22561,7 +22563,7 @@ invalid_for_target_rule(Parser *p)
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s invalid_for_target[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "ASYNC? 'for' star_expressions"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'async'? 'for' star_expressions"));
}
_res = NULL;
done:
@@ -22677,11 +22679,11 @@ invalid_import_rule(Parser *p)
Token * a;
expr_ty dotted_name_var;
if (
- (a = _PyPegen_expect_token(p, 607)) // token='import'
+ (a = _PyPegen_expect_token(p, 617)) // token='import'
&&
(_gather_203_var = _gather_203_rule(p)) // ','.dotted_name+
&&
- (_keyword = _PyPegen_expect_token(p, 608)) // token='from'
+ (_keyword = _PyPegen_expect_token(p, 618)) // token='from'
&&
(dotted_name_var = dotted_name_rule(p)) // dotted_name
)
@@ -22756,8 +22758,8 @@ invalid_import_from_targets_rule(Parser *p)
}
// invalid_with_stmt:
-// | ASYNC? 'with' ','.(expression ['as' star_target])+ NEWLINE
-// | ASYNC? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' NEWLINE
+// | 'async'? 'with' ','.(expression ['as' star_target])+ NEWLINE
+// | 'async'? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' NEWLINE
static void *
invalid_with_stmt_rule(Parser *p)
{
@@ -22771,28 +22773,28 @@ invalid_with_stmt_rule(Parser *p)
}
void * _res = NULL;
int _mark = p->mark;
- { // ASYNC? 'with' ','.(expression ['as' star_target])+ NEWLINE
+ { // 'async'? 'with' ','.(expression ['as' star_target])+ NEWLINE
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> invalid_with_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC? 'with' ','.(expression ['as' star_target])+ NEWLINE"));
+ D(fprintf(stderr, "%*c> invalid_with_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'async'? 'with' ','.(expression ['as' star_target])+ NEWLINE"));
asdl_seq * _gather_205_var;
Token * _keyword;
void *_opt_var;
UNUSED(_opt_var); // Silence compiler warnings
Token * newline_var;
if (
- (_opt_var = _PyPegen_expect_token(p, ASYNC), !p->error_indicator) // ASYNC?
+ (_opt_var = _PyPegen_expect_token(p, 668), !p->error_indicator) // 'async'?
&&
- (_keyword = _PyPegen_expect_token(p, 615)) // token='with'
+ (_keyword = _PyPegen_expect_token(p, 629)) // token='with'
&&
(_gather_205_var = _gather_205_rule(p)) // ','.(expression ['as' star_target])+
&&
(newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE'
)
{
- D(fprintf(stderr, "%*c+ invalid_with_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC? 'with' ','.(expression ['as' star_target])+ NEWLINE"));
+ D(fprintf(stderr, "%*c+ invalid_with_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'async'? 'with' ','.(expression ['as' star_target])+ NEWLINE"));
_res = RAISE_SYNTAX_ERROR ( "expected ':'" );
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -22803,14 +22805,14 @@ invalid_with_stmt_rule(Parser *p)
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s invalid_with_stmt[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "ASYNC? 'with' ','.(expression ['as' star_target])+ NEWLINE"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'async'? 'with' ','.(expression ['as' star_target])+ NEWLINE"));
}
- { // ASYNC? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' NEWLINE
+ { // 'async'? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' NEWLINE
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> invalid_with_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' NEWLINE"));
+ D(fprintf(stderr, "%*c> invalid_with_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'async'? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' NEWLINE"));
asdl_seq * _gather_207_var;
Token * _keyword;
Token * _literal;
@@ -22821,9 +22823,9 @@ invalid_with_stmt_rule(Parser *p)
UNUSED(_opt_var_1); // Silence compiler warnings
Token * newline_var;
if (
- (_opt_var = _PyPegen_expect_token(p, ASYNC), !p->error_indicator) // ASYNC?
+ (_opt_var = _PyPegen_expect_token(p, 668), !p->error_indicator) // 'async'?
&&
- (_keyword = _PyPegen_expect_token(p, 615)) // token='with'
+ (_keyword = _PyPegen_expect_token(p, 629)) // token='with'
&&
(_literal = _PyPegen_expect_token(p, 7)) // token='('
&&
@@ -22836,7 +22838,7 @@ invalid_with_stmt_rule(Parser *p)
(newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE'
)
{
- D(fprintf(stderr, "%*c+ invalid_with_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' NEWLINE"));
+ D(fprintf(stderr, "%*c+ invalid_with_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'async'? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' NEWLINE"));
_res = RAISE_SYNTAX_ERROR ( "expected ':'" );
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -22847,7 +22849,7 @@ invalid_with_stmt_rule(Parser *p)
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s invalid_with_stmt[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "ASYNC? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' NEWLINE"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'async'? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' NEWLINE"));
}
_res = NULL;
done:
@@ -22856,8 +22858,8 @@ invalid_with_stmt_rule(Parser *p)
}
// invalid_with_stmt_indent:
-// | ASYNC? 'with' ','.(expression ['as' star_target])+ ':' NEWLINE !INDENT
-// | ASYNC? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' ':' NEWLINE !INDENT
+// | 'async'? 'with' ','.(expression ['as' star_target])+ ':' NEWLINE !INDENT
+// | 'async'? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' ':' NEWLINE !INDENT
static void *
invalid_with_stmt_indent_rule(Parser *p)
{
@@ -22871,12 +22873,12 @@ invalid_with_stmt_indent_rule(Parser *p)
}
void * _res = NULL;
int _mark = p->mark;
- { // ASYNC? 'with' ','.(expression ['as' star_target])+ ':' NEWLINE !INDENT
+ { // 'async'? 'with' ','.(expression ['as' star_target])+ ':' NEWLINE !INDENT
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> invalid_with_stmt_indent[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC? 'with' ','.(expression ['as' star_target])+ ':' NEWLINE !INDENT"));
+ D(fprintf(stderr, "%*c> invalid_with_stmt_indent[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'async'? 'with' ','.(expression ['as' star_target])+ ':' NEWLINE !INDENT"));
asdl_seq * _gather_209_var;
Token * _literal;
void *_opt_var;
@@ -22884,9 +22886,9 @@ invalid_with_stmt_indent_rule(Parser *p)
Token * a;
Token * newline_var;
if (
- (_opt_var = _PyPegen_expect_token(p, ASYNC), !p->error_indicator) // ASYNC?
+ (_opt_var = _PyPegen_expect_token(p, 668), !p->error_indicator) // 'async'?
&&
- (a = _PyPegen_expect_token(p, 615)) // token='with'
+ (a = _PyPegen_expect_token(p, 629)) // token='with'
&&
(_gather_209_var = _gather_209_rule(p)) // ','.(expression ['as' star_target])+
&&
@@ -22897,7 +22899,7 @@ invalid_with_stmt_indent_rule(Parser *p)
_PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, INDENT) // token=INDENT
)
{
- D(fprintf(stderr, "%*c+ invalid_with_stmt_indent[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC? 'with' ','.(expression ['as' star_target])+ ':' NEWLINE !INDENT"));
+ D(fprintf(stderr, "%*c+ invalid_with_stmt_indent[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'async'? 'with' ','.(expression ['as' star_target])+ ':' NEWLINE !INDENT"));
_res = RAISE_INDENTATION_ERROR ( "expected an indented block after 'with' statement on line %d" , a -> lineno );
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -22908,14 +22910,14 @@ invalid_with_stmt_indent_rule(Parser *p)
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s invalid_with_stmt_indent[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "ASYNC? 'with' ','.(expression ['as' star_target])+ ':' NEWLINE !INDENT"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'async'? 'with' ','.(expression ['as' star_target])+ ':' NEWLINE !INDENT"));
}
- { // ASYNC? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' ':' NEWLINE !INDENT
+ { // 'async'? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' ':' NEWLINE !INDENT
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> invalid_with_stmt_indent[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' ':' NEWLINE !INDENT"));
+ D(fprintf(stderr, "%*c> invalid_with_stmt_indent[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'async'? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' ':' NEWLINE !INDENT"));
asdl_seq * _gather_211_var;
Token * _literal;
Token * _literal_1;
@@ -22927,9 +22929,9 @@ invalid_with_stmt_indent_rule(Parser *p)
Token * a;
Token * newline_var;
if (
- (_opt_var = _PyPegen_expect_token(p, ASYNC), !p->error_indicator) // ASYNC?
+ (_opt_var = _PyPegen_expect_token(p, 668), !p->error_indicator) // 'async'?
&&
- (a = _PyPegen_expect_token(p, 615)) // token='with'
+ (a = _PyPegen_expect_token(p, 629)) // token='with'
&&
(_literal = _PyPegen_expect_token(p, 7)) // token='('
&&
@@ -22946,7 +22948,7 @@ invalid_with_stmt_indent_rule(Parser *p)
_PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, INDENT) // token=INDENT
)
{
- D(fprintf(stderr, "%*c+ invalid_with_stmt_indent[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' ':' NEWLINE !INDENT"));
+ D(fprintf(stderr, "%*c+ invalid_with_stmt_indent[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'async'? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' ':' NEWLINE !INDENT"));
_res = RAISE_INDENTATION_ERROR ( "expected an indented block after 'with' statement on line %d" , a -> lineno );
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -22957,7 +22959,7 @@ invalid_with_stmt_indent_rule(Parser *p)
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s invalid_with_stmt_indent[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "ASYNC? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' ':' NEWLINE !INDENT"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'async'? 'with' '(' ','.(expressions ['as' star_target])+ ','? ')' ':' NEWLINE !INDENT"));
}
_res = NULL;
done:
@@ -22993,7 +22995,7 @@ invalid_try_stmt_rule(Parser *p)
Token * a;
Token * newline_var;
if (
- (a = _PyPegen_expect_token(p, 624)) // token='try'
+ (a = _PyPegen_expect_token(p, 638)) // token='try'
&&
(_literal = _PyPegen_expect_token(p, 11)) // token=':'
&&
@@ -23025,7 +23027,7 @@ invalid_try_stmt_rule(Parser *p)
Token * _literal;
asdl_stmt_seq* block_var;
if (
- (_keyword = _PyPegen_expect_token(p, 624)) // token='try'
+ (_keyword = _PyPegen_expect_token(p, 638)) // token='try'
&&
(_literal = _PyPegen_expect_token(p, 11)) // token=':'
&&
@@ -23064,7 +23066,7 @@ invalid_try_stmt_rule(Parser *p)
Token * b;
expr_ty expression_var;
if (
- (_keyword = _PyPegen_expect_token(p, 624)) // token='try'
+ (_keyword = _PyPegen_expect_token(p, 638)) // token='try'
&&
(_literal = _PyPegen_expect_token(p, 11)) // token=':'
&&
@@ -23072,7 +23074,7 @@ invalid_try_stmt_rule(Parser *p)
&&
(_loop1_215_var = _loop1_215_rule(p)) // except_block+
&&
- (a = _PyPegen_expect_token(p, 637)) // token='except'
+ (a = _PyPegen_expect_token(p, 651)) // token='except'
&&
(b = _PyPegen_expect_token(p, 16)) // token='*'
&&
@@ -23111,7 +23113,7 @@ invalid_try_stmt_rule(Parser *p)
UNUSED(_opt_var); // Silence compiler warnings
Token * a;
if (
- (_keyword = _PyPegen_expect_token(p, 624)) // token='try'
+ (_keyword = _PyPegen_expect_token(p, 638)) // token='try'
&&
(_literal = _PyPegen_expect_token(p, 11)) // token=':'
&&
@@ -23119,7 +23121,7 @@ invalid_try_stmt_rule(Parser *p)
&&
(_loop1_218_var = _loop1_218_rule(p)) // except_star_block+
&&
- (a = _PyPegen_expect_token(p, 637)) // token='except'
+ (a = _PyPegen_expect_token(p, 651)) // token='except'
&&
(_opt_var = _tmp_219_rule(p), !p->error_indicator) // [expression ['as' NAME]]
&&
@@ -23179,7 +23181,7 @@ invalid_except_stmt_rule(Parser *p)
expr_ty a;
expr_ty expressions_var;
if (
- (_keyword = _PyPegen_expect_token(p, 637)) // token='except'
+ (_keyword = _PyPegen_expect_token(p, 651)) // token='except'
&&
(_opt_var = _PyPegen_expect_token(p, 16), !p->error_indicator) // '*'?
&&
@@ -23221,7 +23223,7 @@ invalid_except_stmt_rule(Parser *p)
expr_ty expression_var;
Token * newline_var;
if (
- (a = _PyPegen_expect_token(p, 637)) // token='except'
+ (a = _PyPegen_expect_token(p, 651)) // token='except'
&&
(_opt_var = _PyPegen_expect_token(p, 16), !p->error_indicator) // '*'?
&&
@@ -23254,7 +23256,7 @@ invalid_except_stmt_rule(Parser *p)
Token * a;
Token * newline_var;
if (
- (a = _PyPegen_expect_token(p, 637)) // token='except'
+ (a = _PyPegen_expect_token(p, 651)) // token='except'
&&
(newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE'
)
@@ -23282,7 +23284,7 @@ invalid_except_stmt_rule(Parser *p)
void *_tmp_222_var;
Token * a;
if (
- (a = _PyPegen_expect_token(p, 637)) // token='except'
+ (a = _PyPegen_expect_token(p, 651)) // token='except'
&&
(_literal = _PyPegen_expect_token(p, 16)) // token='*'
&&
@@ -23332,7 +23334,7 @@ invalid_finally_stmt_rule(Parser *p)
Token * a;
Token * newline_var;
if (
- (a = _PyPegen_expect_token(p, 633)) // token='finally'
+ (a = _PyPegen_expect_token(p, 647)) // token='finally'
&&
(_literal = _PyPegen_expect_token(p, 11)) // token=':'
&&
@@ -23389,7 +23391,7 @@ invalid_except_stmt_indent_rule(Parser *p)
expr_ty expression_var;
Token * newline_var;
if (
- (a = _PyPegen_expect_token(p, 637)) // token='except'
+ (a = _PyPegen_expect_token(p, 651)) // token='except'
&&
(expression_var = expression_rule(p)) // expression
&&
@@ -23425,7 +23427,7 @@ invalid_except_stmt_indent_rule(Parser *p)
Token * a;
Token * newline_var;
if (
- (a = _PyPegen_expect_token(p, 637)) // token='except'
+ (a = _PyPegen_expect_token(p, 651)) // token='except'
&&
(_literal = _PyPegen_expect_token(p, 11)) // token=':'
&&
@@ -23482,7 +23484,7 @@ invalid_except_star_stmt_indent_rule(Parser *p)
expr_ty expression_var;
Token * newline_var;
if (
- (a = _PyPegen_expect_token(p, 637)) // token='except'
+ (a = _PyPegen_expect_token(p, 651)) // token='except'
&&
(_literal = _PyPegen_expect_token(p, 16)) // token='*'
&&
@@ -23724,7 +23726,7 @@ invalid_as_pattern_rule(Parser *p)
if (
(or_pattern_var = or_pattern_rule(p)) // or_pattern
&&
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(a = _PyPegen_expect_soft_keyword(p, "_")) // soft_keyword='"_"'
)
@@ -23754,7 +23756,7 @@ invalid_as_pattern_rule(Parser *p)
if (
(or_pattern_var = or_pattern_rule(p)) // or_pattern
&&
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
_PyPegen_lookahead_with_name(0, _PyPegen_name_token, p)
&&
@@ -23911,7 +23913,7 @@ invalid_if_stmt_rule(Parser *p)
expr_ty named_expression_var;
Token * newline_var;
if (
- (_keyword = _PyPegen_expect_token(p, 642)) // token='if'
+ (_keyword = _PyPegen_expect_token(p, 656)) // token='if'
&&
(named_expression_var = named_expression_rule(p)) // named_expression
&&
@@ -23942,7 +23944,7 @@ invalid_if_stmt_rule(Parser *p)
expr_ty a_1;
Token * newline_var;
if (
- (a = _PyPegen_expect_token(p, 642)) // token='if'
+ (a = _PyPegen_expect_token(p, 656)) // token='if'
&&
(a_1 = named_expression_rule(p)) // named_expression
&&
@@ -23998,7 +24000,7 @@ invalid_elif_stmt_rule(Parser *p)
expr_ty named_expression_var;
Token * newline_var;
if (
- (_keyword = _PyPegen_expect_token(p, 644)) // token='elif'
+ (_keyword = _PyPegen_expect_token(p, 658)) // token='elif'
&&
(named_expression_var = named_expression_rule(p)) // named_expression
&&
@@ -24029,7 +24031,7 @@ invalid_elif_stmt_rule(Parser *p)
expr_ty named_expression_var;
Token * newline_var;
if (
- (a = _PyPegen_expect_token(p, 644)) // token='elif'
+ (a = _PyPegen_expect_token(p, 658)) // token='elif'
&&
(named_expression_var = named_expression_rule(p)) // named_expression
&&
@@ -24083,7 +24085,7 @@ invalid_else_stmt_rule(Parser *p)
Token * a;
Token * newline_var;
if (
- (a = _PyPegen_expect_token(p, 645)) // token='else'
+ (a = _PyPegen_expect_token(p, 659)) // token='else'
&&
(_literal = _PyPegen_expect_token(p, 11)) // token=':'
&&
@@ -24137,7 +24139,7 @@ invalid_while_stmt_rule(Parser *p)
expr_ty named_expression_var;
Token * newline_var;
if (
- (_keyword = _PyPegen_expect_token(p, 647)) // token='while'
+ (_keyword = _PyPegen_expect_token(p, 661)) // token='while'
&&
(named_expression_var = named_expression_rule(p)) // named_expression
&&
@@ -24168,7 +24170,7 @@ invalid_while_stmt_rule(Parser *p)
expr_ty named_expression_var;
Token * newline_var;
if (
- (a = _PyPegen_expect_token(p, 647)) // token='while'
+ (a = _PyPegen_expect_token(p, 661)) // token='while'
&&
(named_expression_var = named_expression_rule(p)) // named_expression
&&
@@ -24199,8 +24201,8 @@ invalid_while_stmt_rule(Parser *p)
}
// invalid_for_stmt:
-// | ASYNC? 'for' star_targets 'in' star_expressions NEWLINE
-// | ASYNC? 'for' star_targets 'in' star_expressions ':' NEWLINE !INDENT
+// | 'async'? 'for' star_targets 'in' star_expressions NEWLINE
+// | 'async'? 'for' star_targets 'in' star_expressions ':' NEWLINE !INDENT
static void *
invalid_for_stmt_rule(Parser *p)
{
@@ -24214,12 +24216,12 @@ invalid_for_stmt_rule(Parser *p)
}
void * _res = NULL;
int _mark = p->mark;
- { // ASYNC? 'for' star_targets 'in' star_expressions NEWLINE
+ { // 'async'? 'for' star_targets 'in' star_expressions NEWLINE
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> invalid_for_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC? 'for' star_targets 'in' star_expressions NEWLINE"));
+ D(fprintf(stderr, "%*c> invalid_for_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'async'? 'for' star_targets 'in' star_expressions NEWLINE"));
Token * _keyword;
Token * _keyword_1;
void *_opt_var;
@@ -24228,20 +24230,20 @@ invalid_for_stmt_rule(Parser *p)
expr_ty star_expressions_var;
expr_ty star_targets_var;
if (
- (_opt_var = _PyPegen_expect_token(p, ASYNC), !p->error_indicator) // ASYNC?
+ (_opt_var = _PyPegen_expect_token(p, 668), !p->error_indicator) // 'async'?
&&
- (_keyword = _PyPegen_expect_token(p, 650)) // token='for'
+ (_keyword = _PyPegen_expect_token(p, 666)) // token='for'
&&
(star_targets_var = star_targets_rule(p)) // star_targets
&&
- (_keyword_1 = _PyPegen_expect_token(p, 651)) // token='in'
+ (_keyword_1 = _PyPegen_expect_token(p, 667)) // token='in'
&&
(star_expressions_var = star_expressions_rule(p)) // star_expressions
&&
(newline_var = _PyPegen_expect_token(p, NEWLINE)) // token='NEWLINE'
)
{
- D(fprintf(stderr, "%*c+ invalid_for_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC? 'for' star_targets 'in' star_expressions NEWLINE"));
+ D(fprintf(stderr, "%*c+ invalid_for_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'async'? 'for' star_targets 'in' star_expressions NEWLINE"));
_res = RAISE_SYNTAX_ERROR ( "expected ':'" );
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -24252,14 +24254,14 @@ invalid_for_stmt_rule(Parser *p)
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s invalid_for_stmt[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "ASYNC? 'for' star_targets 'in' star_expressions NEWLINE"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'async'? 'for' star_targets 'in' star_expressions NEWLINE"));
}
- { // ASYNC? 'for' star_targets 'in' star_expressions ':' NEWLINE !INDENT
+ { // 'async'? 'for' star_targets 'in' star_expressions ':' NEWLINE !INDENT
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> invalid_for_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC? 'for' star_targets 'in' star_expressions ':' NEWLINE !INDENT"));
+ D(fprintf(stderr, "%*c> invalid_for_stmt[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'async'? 'for' star_targets 'in' star_expressions ':' NEWLINE !INDENT"));
Token * _keyword;
Token * _literal;
void *_opt_var;
@@ -24269,13 +24271,13 @@ invalid_for_stmt_rule(Parser *p)
expr_ty star_expressions_var;
expr_ty star_targets_var;
if (
- (_opt_var = _PyPegen_expect_token(p, ASYNC), !p->error_indicator) // ASYNC?
+ (_opt_var = _PyPegen_expect_token(p, 668), !p->error_indicator) // 'async'?
&&
- (a = _PyPegen_expect_token(p, 650)) // token='for'
+ (a = _PyPegen_expect_token(p, 666)) // token='for'
&&
(star_targets_var = star_targets_rule(p)) // star_targets
&&
- (_keyword = _PyPegen_expect_token(p, 651)) // token='in'
+ (_keyword = _PyPegen_expect_token(p, 667)) // token='in'
&&
(star_expressions_var = star_expressions_rule(p)) // star_expressions
&&
@@ -24286,7 +24288,7 @@ invalid_for_stmt_rule(Parser *p)
_PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, INDENT) // token=INDENT
)
{
- D(fprintf(stderr, "%*c+ invalid_for_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC? 'for' star_targets 'in' star_expressions ':' NEWLINE !INDENT"));
+ D(fprintf(stderr, "%*c+ invalid_for_stmt[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'async'? 'for' star_targets 'in' star_expressions ':' NEWLINE !INDENT"));
_res = RAISE_INDENTATION_ERROR ( "expected an indented block after 'for' statement on line %d" , a -> lineno );
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -24297,7 +24299,7 @@ invalid_for_stmt_rule(Parser *p)
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s invalid_for_stmt[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "ASYNC? 'for' star_targets 'in' star_expressions ':' NEWLINE !INDENT"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'async'? 'for' star_targets 'in' star_expressions ':' NEWLINE !INDENT"));
}
_res = NULL;
done:
@@ -24306,7 +24308,7 @@ invalid_for_stmt_rule(Parser *p)
}
// invalid_def_raw:
-// | ASYNC? 'def' NAME '(' params? ')' ['->' expression] ':' NEWLINE !INDENT
+// | 'async'? 'def' NAME '(' params? ')' ['->' expression] ':' NEWLINE !INDENT
static void *
invalid_def_raw_rule(Parser *p)
{
@@ -24320,12 +24322,12 @@ invalid_def_raw_rule(Parser *p)
}
void * _res = NULL;
int _mark = p->mark;
- { // ASYNC? 'def' NAME '(' params? ')' ['->' expression] ':' NEWLINE !INDENT
+ { // 'async'? 'def' NAME '(' params? ')' ['->' expression] ':' NEWLINE !INDENT
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> invalid_def_raw[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC? 'def' NAME '(' params? ')' ['->' expression] ':' NEWLINE !INDENT"));
+ D(fprintf(stderr, "%*c> invalid_def_raw[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'async'? 'def' NAME '(' params? ')' ['->' expression] ':' NEWLINE !INDENT"));
Token * _literal;
Token * _literal_1;
Token * _literal_2;
@@ -24339,9 +24341,9 @@ invalid_def_raw_rule(Parser *p)
expr_ty name_var;
Token * newline_var;
if (
- (_opt_var = _PyPegen_expect_token(p, ASYNC), !p->error_indicator) // ASYNC?
+ (_opt_var = _PyPegen_expect_token(p, 668), !p->error_indicator) // 'async'?
&&
- (a = _PyPegen_expect_token(p, 652)) // token='def'
+ (a = _PyPegen_expect_token(p, 669)) // token='def'
&&
(name_var = _PyPegen_name_token(p)) // NAME
&&
@@ -24360,7 +24362,7 @@ invalid_def_raw_rule(Parser *p)
_PyPegen_lookahead_with_int(0, _PyPegen_expect_token, p, INDENT) // token=INDENT
)
{
- D(fprintf(stderr, "%*c+ invalid_def_raw[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC? 'def' NAME '(' params? ')' ['->' expression] ':' NEWLINE !INDENT"));
+ D(fprintf(stderr, "%*c+ invalid_def_raw[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'async'? 'def' NAME '(' params? ')' ['->' expression] ':' NEWLINE !INDENT"));
_res = RAISE_INDENTATION_ERROR ( "expected an indented block after function definition on line %d" , a -> lineno );
if (_res == NULL && PyErr_Occurred()) {
p->error_indicator = 1;
@@ -24371,7 +24373,7 @@ invalid_def_raw_rule(Parser *p)
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s invalid_def_raw[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "ASYNC? 'def' NAME '(' params? ')' ['->' expression] ':' NEWLINE !INDENT"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'async'? 'def' NAME '(' params? ')' ['->' expression] ':' NEWLINE !INDENT"));
}
_res = NULL;
done:
@@ -24407,7 +24409,7 @@ invalid_class_def_raw_rule(Parser *p)
expr_ty name_var;
Token * newline_var;
if (
- (_keyword = _PyPegen_expect_token(p, 654)) // token='class'
+ (_keyword = _PyPegen_expect_token(p, 671)) // token='class'
&&
(name_var = _PyPegen_name_token(p)) // NAME
&&
@@ -24442,7 +24444,7 @@ invalid_class_def_raw_rule(Parser *p)
expr_ty name_var;
Token * newline_var;
if (
- (a = _PyPegen_expect_token(p, 654)) // token='class'
+ (a = _PyPegen_expect_token(p, 671)) // token='class'
&&
(name_var = _PyPegen_name_token(p)) // NAME
&&
@@ -25610,7 +25612,7 @@ _tmp_7_rule(Parser *p)
D(fprintf(stderr, "%*c> _tmp_7[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'import'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 607)) // token='import'
+ (_keyword = _PyPegen_expect_token(p, 617)) // token='import'
)
{
D(fprintf(stderr, "%*c+ _tmp_7[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'import'"));
@@ -25629,7 +25631,7 @@ _tmp_7_rule(Parser *p)
D(fprintf(stderr, "%*c> _tmp_7[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'from'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 608)) // token='from'
+ (_keyword = _PyPegen_expect_token(p, 618)) // token='from'
)
{
D(fprintf(stderr, "%*c+ _tmp_7[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'from'"));
@@ -25646,7 +25648,7 @@ _tmp_7_rule(Parser *p)
return _res;
}
-// _tmp_8: 'def' | '@' | ASYNC
+// _tmp_8: 'def' | '@' | 'async'
static void *
_tmp_8_rule(Parser *p)
{
@@ -25668,7 +25670,7 @@ _tmp_8_rule(Parser *p)
D(fprintf(stderr, "%*c> _tmp_8[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'def'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 652)) // token='def'
+ (_keyword = _PyPegen_expect_token(p, 669)) // token='def'
)
{
D(fprintf(stderr, "%*c+ _tmp_8[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'def'"));
@@ -25698,24 +25700,24 @@ _tmp_8_rule(Parser *p)
D(fprintf(stderr, "%*c%s _tmp_8[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'@'"));
}
- { // ASYNC
+ { // 'async'
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_8[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC"));
- Token * async_var;
+ D(fprintf(stderr, "%*c> _tmp_8[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'async'"));
+ Token * _keyword;
if (
- (async_var = _PyPegen_expect_token(p, ASYNC)) // token='ASYNC'
+ (_keyword = _PyPegen_expect_token(p, 668)) // token='async'
)
{
- D(fprintf(stderr, "%*c+ _tmp_8[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC"));
- _res = async_var;
+ D(fprintf(stderr, "%*c+ _tmp_8[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'async'"));
+ _res = _keyword;
goto done;
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s _tmp_8[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "ASYNC"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'async'"));
}
_res = NULL;
done:
@@ -25745,7 +25747,7 @@ _tmp_9_rule(Parser *p)
D(fprintf(stderr, "%*c> _tmp_9[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'class'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 654)) // token='class'
+ (_keyword = _PyPegen_expect_token(p, 671)) // token='class'
)
{
D(fprintf(stderr, "%*c+ _tmp_9[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'class'"));
@@ -25781,7 +25783,7 @@ _tmp_9_rule(Parser *p)
return _res;
}
-// _tmp_10: 'with' | ASYNC
+// _tmp_10: 'with' | 'async'
static void *
_tmp_10_rule(Parser *p)
{
@@ -25803,7 +25805,7 @@ _tmp_10_rule(Parser *p)
D(fprintf(stderr, "%*c> _tmp_10[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'with'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 615)) // token='with'
+ (_keyword = _PyPegen_expect_token(p, 629)) // token='with'
)
{
D(fprintf(stderr, "%*c+ _tmp_10[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'with'"));
@@ -25814,24 +25816,24 @@ _tmp_10_rule(Parser *p)
D(fprintf(stderr, "%*c%s _tmp_10[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'with'"));
}
- { // ASYNC
+ { // 'async'
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_10[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC"));
- Token * async_var;
+ D(fprintf(stderr, "%*c> _tmp_10[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'async'"));
+ Token * _keyword;
if (
- (async_var = _PyPegen_expect_token(p, ASYNC)) // token='ASYNC'
+ (_keyword = _PyPegen_expect_token(p, 668)) // token='async'
)
{
- D(fprintf(stderr, "%*c+ _tmp_10[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC"));
- _res = async_var;
+ D(fprintf(stderr, "%*c+ _tmp_10[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'async'"));
+ _res = _keyword;
goto done;
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s _tmp_10[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "ASYNC"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'async'"));
}
_res = NULL;
done:
@@ -25839,7 +25841,7 @@ _tmp_10_rule(Parser *p)
return _res;
}
-// _tmp_11: 'for' | ASYNC
+// _tmp_11: 'for' | 'async'
static void *
_tmp_11_rule(Parser *p)
{
@@ -25861,7 +25863,7 @@ _tmp_11_rule(Parser *p)
D(fprintf(stderr, "%*c> _tmp_11[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'for'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 650)) // token='for'
+ (_keyword = _PyPegen_expect_token(p, 666)) // token='for'
)
{
D(fprintf(stderr, "%*c+ _tmp_11[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'for'"));
@@ -25872,24 +25874,24 @@ _tmp_11_rule(Parser *p)
D(fprintf(stderr, "%*c%s _tmp_11[%d-%d]: %s failed!\n", p->level, ' ',
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'for'"));
}
- { // ASYNC
+ { // 'async'
if (p->error_indicator) {
p->level--;
return NULL;
}
- D(fprintf(stderr, "%*c> _tmp_11[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "ASYNC"));
- Token * async_var;
+ D(fprintf(stderr, "%*c> _tmp_11[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'async'"));
+ Token * _keyword;
if (
- (async_var = _PyPegen_expect_token(p, ASYNC)) // token='ASYNC'
+ (_keyword = _PyPegen_expect_token(p, 668)) // token='async'
)
{
- D(fprintf(stderr, "%*c+ _tmp_11[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "ASYNC"));
- _res = async_var;
+ D(fprintf(stderr, "%*c+ _tmp_11[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'async'"));
+ _res = _keyword;
goto done;
}
p->mark = _mark;
D(fprintf(stderr, "%*c%s _tmp_11[%d-%d]: %s failed!\n", p->level, ' ',
- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "ASYNC"));
+ p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'async'"));
}
_res = NULL;
done:
@@ -26272,7 +26274,7 @@ _tmp_18_rule(Parser *p)
Token * _keyword;
expr_ty z;
if (
- (_keyword = _PyPegen_expect_token(p, 608)) // token='from'
+ (_keyword = _PyPegen_expect_token(p, 618)) // token='from'
&&
(z = expression_rule(p)) // expression
)
@@ -26922,7 +26924,7 @@ _tmp_29_rule(Parser *p)
Token * _keyword;
expr_ty z;
if (
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(z = _PyPegen_name_token(p)) // NAME
)
@@ -27088,7 +27090,7 @@ _tmp_32_rule(Parser *p)
Token * _keyword;
expr_ty z;
if (
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(z = _PyPegen_name_token(p)) // NAME
)
@@ -29106,7 +29108,7 @@ _tmp_63_rule(Parser *p)
Token * _keyword;
expr_ty z;
if (
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(z = _PyPegen_name_token(p)) // NAME
)
@@ -29153,7 +29155,7 @@ _tmp_64_rule(Parser *p)
Token * _keyword;
expr_ty z;
if (
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(z = _PyPegen_name_token(p)) // NAME
)
@@ -34721,7 +34723,7 @@ _tmp_153_rule(Parser *p)
D(fprintf(stderr, "%*c> _tmp_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'True'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 601)) // token='True'
+ (_keyword = _PyPegen_expect_token(p, 610)) // token='True'
)
{
D(fprintf(stderr, "%*c+ _tmp_153[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'True'"));
@@ -34740,7 +34742,7 @@ _tmp_153_rule(Parser *p)
D(fprintf(stderr, "%*c> _tmp_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'False'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 603)) // token='False'
+ (_keyword = _PyPegen_expect_token(p, 612)) // token='False'
)
{
D(fprintf(stderr, "%*c+ _tmp_153[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'False'"));
@@ -34759,7 +34761,7 @@ _tmp_153_rule(Parser *p)
D(fprintf(stderr, "%*c> _tmp_153[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'None'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 602)) // token='None'
+ (_keyword = _PyPegen_expect_token(p, 611)) // token='None'
)
{
D(fprintf(stderr, "%*c+ _tmp_153[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'None'"));
@@ -34901,7 +34903,7 @@ _tmp_156_rule(Parser *p)
D(fprintf(stderr, "%*c> _tmp_156[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'else'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 645)) // token='else'
+ (_keyword = _PyPegen_expect_token(p, 659)) // token='else'
)
{
D(fprintf(stderr, "%*c+ _tmp_156[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'else'"));
@@ -35132,7 +35134,7 @@ _tmp_159_rule(Parser *p)
D(fprintf(stderr, "%*c> _tmp_159[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'True'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 601)) // token='True'
+ (_keyword = _PyPegen_expect_token(p, 610)) // token='True'
)
{
D(fprintf(stderr, "%*c+ _tmp_159[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'True'"));
@@ -35151,7 +35153,7 @@ _tmp_159_rule(Parser *p)
D(fprintf(stderr, "%*c> _tmp_159[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'None'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 602)) // token='None'
+ (_keyword = _PyPegen_expect_token(p, 611)) // token='None'
)
{
D(fprintf(stderr, "%*c+ _tmp_159[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'None'"));
@@ -35170,7 +35172,7 @@ _tmp_159_rule(Parser *p)
D(fprintf(stderr, "%*c> _tmp_159[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'False'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 603)) // token='False'
+ (_keyword = _PyPegen_expect_token(p, 612)) // token='False'
)
{
D(fprintf(stderr, "%*c+ _tmp_159[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'False'"));
@@ -38608,7 +38610,7 @@ _tmp_213_rule(Parser *p)
D(fprintf(stderr, "%*c> _tmp_213[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'except'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 637)) // token='except'
+ (_keyword = _PyPegen_expect_token(p, 651)) // token='except'
)
{
D(fprintf(stderr, "%*c+ _tmp_213[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'except'"));
@@ -38627,7 +38629,7 @@ _tmp_213_rule(Parser *p)
D(fprintf(stderr, "%*c> _tmp_213[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'finally'"));
Token * _keyword;
if (
- (_keyword = _PyPegen_expect_token(p, 633)) // token='finally'
+ (_keyword = _PyPegen_expect_token(p, 647)) // token='finally'
)
{
D(fprintf(stderr, "%*c+ _tmp_213[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'finally'"));
@@ -38808,7 +38810,7 @@ _tmp_216_rule(Parser *p)
Token * _keyword;
expr_ty name_var;
if (
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(name_var = _PyPegen_name_token(p)) // NAME
)
@@ -39034,7 +39036,7 @@ _tmp_220_rule(Parser *p)
Token * _keyword;
expr_ty name_var;
if (
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(name_var = _PyPegen_name_token(p)) // NAME
)
@@ -39076,7 +39078,7 @@ _tmp_221_rule(Parser *p)
Token * _keyword;
expr_ty name_var;
if (
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(name_var = _PyPegen_name_token(p)) // NAME
)
@@ -39176,7 +39178,7 @@ _tmp_223_rule(Parser *p)
Token * _keyword;
expr_ty name_var;
if (
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(name_var = _PyPegen_name_token(p)) // NAME
)
@@ -39218,7 +39220,7 @@ _tmp_224_rule(Parser *p)
Token * _keyword;
expr_ty name_var;
if (
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(name_var = _PyPegen_name_token(p)) // NAME
)
@@ -40867,7 +40869,7 @@ _tmp_254_rule(Parser *p)
Token * _keyword;
expr_ty c;
if (
- (_keyword = _PyPegen_expect_token(p, 574)) // token='or'
+ (_keyword = _PyPegen_expect_token(p, 581)) // token='or'
&&
(c = conjunction_rule(p)) // conjunction
)
@@ -40914,7 +40916,7 @@ _tmp_255_rule(Parser *p)
Token * _keyword;
expr_ty c;
if (
- (_keyword = _PyPegen_expect_token(p, 575)) // token='and'
+ (_keyword = _PyPegen_expect_token(p, 582)) // token='and'
&&
(c = inversion_rule(p)) // inversion
)
@@ -41077,7 +41079,7 @@ _tmp_258_rule(Parser *p)
Token * _keyword;
expr_ty z;
if (
- (_keyword = _PyPegen_expect_token(p, 642)) // token='if'
+ (_keyword = _PyPegen_expect_token(p, 656)) // token='if'
&&
(z = disjunction_rule(p)) // disjunction
)
@@ -41124,7 +41126,7 @@ _tmp_259_rule(Parser *p)
Token * _keyword;
expr_ty z;
if (
- (_keyword = _PyPegen_expect_token(p, 642)) // token='if'
+ (_keyword = _PyPegen_expect_token(p, 656)) // token='if'
&&
(z = disjunction_rule(p)) // disjunction
)
@@ -41697,7 +41699,7 @@ _tmp_271_rule(Parser *p)
Token * _keyword;
expr_ty name_var;
if (
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(name_var = _PyPegen_name_token(p)) // NAME
)
@@ -41799,7 +41801,7 @@ _tmp_273_rule(Parser *p)
Token * _keyword;
expr_ty star_target_var;
if (
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(star_target_var = star_target_rule(p)) // star_target
)
@@ -41841,7 +41843,7 @@ _tmp_274_rule(Parser *p)
Token * _keyword;
expr_ty star_target_var;
if (
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(star_target_var = star_target_rule(p)) // star_target
)
@@ -41883,7 +41885,7 @@ _tmp_275_rule(Parser *p)
Token * _keyword;
expr_ty star_target_var;
if (
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(star_target_var = star_target_rule(p)) // star_target
)
@@ -41925,7 +41927,7 @@ _tmp_276_rule(Parser *p)
Token * _keyword;
expr_ty star_target_var;
if (
- (_keyword = _PyPegen_expect_token(p, 640)) // token='as'
+ (_keyword = _PyPegen_expect_token(p, 654)) // token='as'
&&
(star_target_var = star_target_rule(p)) // star_target
)