(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},
},
};
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
)
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
)
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
)
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
)
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
)
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
)
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
)
}
// 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
}
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)
(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) {
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
)
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)
(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)
(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) {
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
)
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
)
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?
)
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
&&
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'"));
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+
)
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+
)
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
&&
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
&&
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
)
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
)
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
)
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
&&
// 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)
{
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
&&
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
&&
(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--;
}
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:
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
&&
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
&&
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
&&
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
&&
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=':'
&&
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
&&
// 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)
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)
&&
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)
&&
(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--;
}
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;
// | 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)
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='('
&&
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+
&&
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='('
&&
(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--;
}
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+
&&
(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--;
}
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) {
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
&&
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=':'
&&
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=':'
&&
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=':'
&&
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
&&
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=':'
&&
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='*'
&&
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=':'
&&
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
)
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
)
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'"));
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'"));
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'"));
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'"));
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'"));
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'"));
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
)
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
)
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?
)
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
)
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
)
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
)
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
)
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
)
return _res;
}
-// await_primary: AWAIT primary | primary
+// await_primary: 'await' primary | primary
static expr_ty
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--;
}
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) {
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'"));
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'"));
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'"));
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?
&&
}
// 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
}
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)
&&
(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;
}
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;
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)
&&
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
)
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
&&
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?
&&
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
)
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
&&
return _res;
}
-// invalid_for_target: ASYNC? 'for' star_expressions
+// invalid_for_target: 'async'? 'for' star_expressions
static void *
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;
}
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:
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
)
}
// 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)
{
}
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;
}
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;
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='('
&&
(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;
}
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:
}
// 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)
{
}
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;
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])+
&&
_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;
}
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;
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='('
&&
_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;
}
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:
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=':'
&&
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=':'
&&
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=':'
&&
&&
(_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='*'
&&
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=':'
&&
&&
(_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]]
&&
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) // '*'?
&&
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) // '*'?
&&
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'
)
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='*'
&&
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=':'
&&
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
&&
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=':'
&&
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='*'
&&
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='"_"'
)
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)
&&
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
&&
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
&&
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
&&
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
&&
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=':'
&&
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
&&
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
&&
}
// 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)
{
}
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;
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;
}
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;
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
&&
_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;
}
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:
}
// 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)
{
}
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;
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
&&
_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;
}
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:
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
&&
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
&&
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'"));
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'"));
return _res;
}
-// _tmp_8: 'def' | '@' | ASYNC
+// _tmp_8: 'def' | '@' | 'async'
static void *
_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'"));
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:
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'"));
return _res;
}
-// _tmp_10: 'with' | ASYNC
+// _tmp_10: 'with' | 'async'
static void *
_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'"));
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:
return _res;
}
-// _tmp_11: 'for' | ASYNC
+// _tmp_11: 'for' | 'async'
static void *
_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'"));
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:
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
)
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
)
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
)
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
)
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
)
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'"));
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'"));
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'"));
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'"));
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'"));
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'"));
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'"));
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'"));
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'"));
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
)
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
)
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
)
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
)
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
)
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
)
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
)
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
)
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
)
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
)
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
)
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
)
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
)
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
)