@@ -7,16 +7,16 @@ extern int Py_DebugFlag;
7
7
#else
8
8
#define D(x)
9
9
#endif
10
- static const int n_keyword_lists = 15 ;
10
+ static const int n_keyword_lists = 9 ;
11
11
static KeywordToken *reserved_keywords[] = {
12
12
NULL,
13
13
NULL,
14
14
(KeywordToken[]) {
15
15
{"if", 510},
16
16
{"in", 518},
17
17
{"is", 526},
18
- {"as", 531 },
19
- {"or", 532 },
18
+ {"as", 530 },
19
+ {"or", 531 },
20
20
{NULL, -1},
21
21
},
22
22
(KeywordToken[]) {
@@ -25,7 +25,7 @@ static KeywordToken *reserved_keywords[] = {
25
25
{"for", 517},
26
26
{"def", 522},
27
27
{"not", 525},
28
- {"and", 533 },
28
+ {"and", 532 },
29
29
{NULL, -1},
30
30
},
31
31
(KeywordToken[]) {
@@ -65,15 +65,6 @@ static KeywordToken *reserved_keywords[] = {
65
65
{"nonlocal", 509},
66
66
{NULL, -1},
67
67
},
68
- NULL,
69
- NULL,
70
- NULL,
71
- NULL,
72
- NULL,
73
- (KeywordToken[]) {
74
- {"__new_parser__", 530},
75
- {NULL, -1},
76
- },
77
68
};
78
69
#define file_type 1000
79
70
#define interactive_type 1001
@@ -10567,7 +10558,6 @@ slice_rule(Parser *p)
10567
10558
// | 'True'
10568
10559
// | 'False'
10569
10560
// | 'None'
10570
- // | '__new_parser__'
10571
10561
// | &STRING strings
10572
10562
// | NUMBER
10573
10563
// | &'(' (tuple | group | genexp)
@@ -10711,30 +10701,6 @@ atom_rule(Parser *p)
10711
10701
D(fprintf(stderr, "%*c%s atom[%d-%d]: %s failed!\n", p->level, ' ',
10712
10702
p->error_indicator ? "ERROR!" : "-", _mark, p->mark, "'None'"));
10713
10703
}
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
- }
10738
10704
{ // &STRING strings
10739
10705
if (p->error_indicator) {
10740
10706
D(p->level--);
@@ -17313,7 +17279,7 @@ _tmp_34_rule(Parser *p)
17313
17279
Token * _keyword;
17314
17280
expr_ty z;
17315
17281
if (
17316
- (_keyword = _PyPegen_expect_token(p, 531 )) // token='as'
17282
+ (_keyword = _PyPegen_expect_token(p, 530 )) // token='as'
17317
17283
&&
17318
17284
(z = _PyPegen_name_token(p)) // NAME
17319
17285
)
@@ -17471,7 +17437,7 @@ _tmp_37_rule(Parser *p)
17471
17437
Token * _keyword;
17472
17438
expr_ty z;
17473
17439
if (
17474
- (_keyword = _PyPegen_expect_token(p, 531 )) // token='as'
17440
+ (_keyword = _PyPegen_expect_token(p, 530 )) // token='as'
17475
17441
&&
17476
17442
(z = _PyPegen_name_token(p)) // NAME
17477
17443
)
@@ -17971,7 +17937,7 @@ _tmp_46_rule(Parser *p)
17971
17937
Token * _keyword;
17972
17938
expr_ty t;
17973
17939
if (
17974
- (_keyword = _PyPegen_expect_token(p, 531 )) // token='as'
17940
+ (_keyword = _PyPegen_expect_token(p, 530 )) // token='as'
17975
17941
&&
17976
17942
(t = target_rule(p)) // target
17977
17943
)
@@ -18086,7 +18052,7 @@ _tmp_48_rule(Parser *p)
18086
18052
Token * _keyword;
18087
18053
expr_ty z;
18088
18054
if (
18089
- (_keyword = _PyPegen_expect_token(p, 531 )) // token='as'
18055
+ (_keyword = _PyPegen_expect_token(p, 530 )) // token='as'
18090
18056
&&
18091
18057
(z = _PyPegen_name_token(p)) // NAME
18092
18058
)
@@ -23892,7 +23858,7 @@ _tmp_144_rule(Parser *p)
23892
23858
Token * _keyword;
23893
23859
expr_ty c;
23894
23860
if (
23895
- (_keyword = _PyPegen_expect_token(p, 532 )) // token='or'
23861
+ (_keyword = _PyPegen_expect_token(p, 531 )) // token='or'
23896
23862
&&
23897
23863
(c = conjunction_rule(p)) // conjunction
23898
23864
)
@@ -23936,7 +23902,7 @@ _tmp_145_rule(Parser *p)
23936
23902
Token * _keyword;
23937
23903
expr_ty c;
23938
23904
if (
23939
- (_keyword = _PyPegen_expect_token(p, 533 )) // token='and'
23905
+ (_keyword = _PyPegen_expect_token(p, 532 )) // token='and'
23940
23906
&&
23941
23907
(c = inversion_rule(p)) // inversion
23942
23908
)
0 commit comments