@@ -7,16 +7,16 @@ extern int Py_DebugFlag;
77#else
88#define D(x)
99#endif
10- static const int n_keyword_lists = 15 ;
10+ static const int n_keyword_lists = 9 ;
1111static KeywordToken *reserved_keywords[] = {
1212 NULL,
1313 NULL,
1414 (KeywordToken[]) {
1515 {"if", 510},
1616 {"in", 518},
1717 {"is", 526},
18- {"as", 531 },
19- {"or", 532 },
18+ {"as", 530 },
19+ {"or", 531 },
2020 {NULL, -1},
2121 },
2222 (KeywordToken[]) {
@@ -25,7 +25,7 @@ static KeywordToken *reserved_keywords[] = {
2525 {"for", 517},
2626 {"def", 522},
2727 {"not", 525},
28- {"and", 533 },
28+ {"and", 532 },
2929 {NULL, -1},
3030 },
3131 (KeywordToken[]) {
@@ -65,15 +65,6 @@ static KeywordToken *reserved_keywords[] = {
6565 {"nonlocal", 509},
6666 {NULL, -1},
6767 },
68- NULL,
69- NULL,
70- NULL,
71- NULL,
72- NULL,
73- (KeywordToken[]) {
74- {"__new_parser__", 530},
75- {NULL, -1},
76- },
7768};
7869#define file_type 1000
7970#define interactive_type 1001
@@ -10567,7 +10558,6 @@ slice_rule(Parser *p)
1056710558// | 'True'
1056810559// | 'False'
1056910560// | 'None'
10570- // | '__new_parser__'
1057110561// | &STRING strings
1057210562// | NUMBER
1057310563// | &'(' (tuple | group | genexp)
@@ -10711,30 +10701,6 @@ atom_rule(Parser *p)
1071110701 D(fprintf(stderr, "%*c%s atom[%d-%d]: %s failed!\n", p->level, ' ',
1071210702 p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'None'"));
1071310703 }
10714- { // '__new_parser__'
10715- if (p->error_indicator) {
10716- D(p->level--);
10717- return NULL;
10718- }
10719- D(fprintf(stderr, "%*c> atom[%d-%d]: %s\n", p->level, ' ', _mark, p->mark, "'__new_parser__'"));
10720- Token * _keyword;
10721- if (
10722- (_keyword = _PyPegen_expect_token(p, 530)) // token='__new_parser__'
10723- )
10724- {
10725- D(fprintf(stderr, "%*c+ atom[%d-%d]: %s succeeded!\n", p->level, ' ', _mark, p->mark, "'__new_parser__'"));
10726- _res = RAISE_SYNTAX_ERROR ( "You found it!" );
10727- if (_res == NULL && PyErr_Occurred()) {
10728- p->error_indicator = 1;
10729- D(p->level--);
10730- return NULL;
10731- }
10732- goto done;
10733- }
10734- p->mark = _mark;
10735- D(fprintf(stderr, "%*c%s atom[%d-%d]: %s failed!\n", p->level, ' ',
10736- p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'__new_parser__'"));
10737- }
1073810704 { // &STRING strings
1073910705 if (p->error_indicator) {
1074010706 D(p->level--);
@@ -17313,7 +17279,7 @@ _tmp_34_rule(Parser *p)
1731317279 Token * _keyword;
1731417280 expr_ty z;
1731517281 if (
17316- (_keyword = _PyPegen_expect_token(p, 531 )) // token='as'
17282+ (_keyword = _PyPegen_expect_token(p, 530 )) // token='as'
1731717283 &&
1731817284 (z = _PyPegen_name_token(p)) // NAME
1731917285 )
@@ -17471,7 +17437,7 @@ _tmp_37_rule(Parser *p)
1747117437 Token * _keyword;
1747217438 expr_ty z;
1747317439 if (
17474- (_keyword = _PyPegen_expect_token(p, 531 )) // token='as'
17440+ (_keyword = _PyPegen_expect_token(p, 530 )) // token='as'
1747517441 &&
1747617442 (z = _PyPegen_name_token(p)) // NAME
1747717443 )
@@ -17971,7 +17937,7 @@ _tmp_46_rule(Parser *p)
1797117937 Token * _keyword;
1797217938 expr_ty t;
1797317939 if (
17974- (_keyword = _PyPegen_expect_token(p, 531 )) // token='as'
17940+ (_keyword = _PyPegen_expect_token(p, 530 )) // token='as'
1797517941 &&
1797617942 (t = target_rule(p)) // target
1797717943 )
@@ -18086,7 +18052,7 @@ _tmp_48_rule(Parser *p)
1808618052 Token * _keyword;
1808718053 expr_ty z;
1808818054 if (
18089- (_keyword = _PyPegen_expect_token(p, 531 )) // token='as'
18055+ (_keyword = _PyPegen_expect_token(p, 530 )) // token='as'
1809018056 &&
1809118057 (z = _PyPegen_name_token(p)) // NAME
1809218058 )
@@ -23892,7 +23858,7 @@ _tmp_144_rule(Parser *p)
2389223858 Token * _keyword;
2389323859 expr_ty c;
2389423860 if (
23895- (_keyword = _PyPegen_expect_token(p, 532 )) // token='or'
23861+ (_keyword = _PyPegen_expect_token(p, 531 )) // token='or'
2389623862 &&
2389723863 (c = conjunction_rule(p)) // conjunction
2389823864 )
@@ -23936,7 +23902,7 @@ _tmp_145_rule(Parser *p)
2393623902 Token * _keyword;
2393723903 expr_ty c;
2393823904 if (
23939- (_keyword = _PyPegen_expect_token(p, 533 )) // token='and'
23905+ (_keyword = _PyPegen_expect_token(p, 532 )) // token='and'
2394023906 &&
2394123907 (c = inversion_rule(p)) // inversion
2394223908 )
0 commit comments