Line | |
---|
1 | #! /usr/bin/env python
|
---|
2 |
|
---|
3 | """Non-terminal symbols of Python grammar (from "graminit.h")."""
|
---|
4 |
|
---|
5 | # This file is automatically generated; please don't muck it up!
|
---|
6 | #
|
---|
7 | # To update the symbols in this file, 'cd' to the top directory of
|
---|
8 | # the python source tree after building the interpreter and run:
|
---|
9 | #
|
---|
10 | # python Lib/symbol.py
|
---|
11 |
|
---|
12 | #--start constants--
|
---|
13 | single_input = 256
|
---|
14 | file_input = 257
|
---|
15 | eval_input = 258
|
---|
16 | decorator = 259
|
---|
17 | decorators = 260
|
---|
18 | funcdef = 261
|
---|
19 | parameters = 262
|
---|
20 | varargslist = 263
|
---|
21 | fpdef = 264
|
---|
22 | fplist = 265
|
---|
23 | stmt = 266
|
---|
24 | simple_stmt = 267
|
---|
25 | small_stmt = 268
|
---|
26 | expr_stmt = 269
|
---|
27 | augassign = 270
|
---|
28 | print_stmt = 271
|
---|
29 | del_stmt = 272
|
---|
30 | pass_stmt = 273
|
---|
31 | flow_stmt = 274
|
---|
32 | break_stmt = 275
|
---|
33 | continue_stmt = 276
|
---|
34 | return_stmt = 277
|
---|
35 | yield_stmt = 278
|
---|
36 | raise_stmt = 279
|
---|
37 | import_stmt = 280
|
---|
38 | import_name = 281
|
---|
39 | import_from = 282
|
---|
40 | import_as_name = 283
|
---|
41 | dotted_as_name = 284
|
---|
42 | import_as_names = 285
|
---|
43 | dotted_as_names = 286
|
---|
44 | dotted_name = 287
|
---|
45 | global_stmt = 288
|
---|
46 | exec_stmt = 289
|
---|
47 | assert_stmt = 290
|
---|
48 | compound_stmt = 291
|
---|
49 | if_stmt = 292
|
---|
50 | while_stmt = 293
|
---|
51 | for_stmt = 294
|
---|
52 | try_stmt = 295
|
---|
53 | with_stmt = 296
|
---|
54 | with_var = 297
|
---|
55 | except_clause = 298
|
---|
56 | suite = 299
|
---|
57 | testlist_safe = 300
|
---|
58 | old_test = 301
|
---|
59 | old_lambdef = 302
|
---|
60 | test = 303
|
---|
61 | or_test = 304
|
---|
62 | and_test = 305
|
---|
63 | not_test = 306
|
---|
64 | comparison = 307
|
---|
65 | comp_op = 308
|
---|
66 | expr = 309
|
---|
67 | xor_expr = 310
|
---|
68 | and_expr = 311
|
---|
69 | shift_expr = 312
|
---|
70 | arith_expr = 313
|
---|
71 | term = 314
|
---|
72 | factor = 315
|
---|
73 | power = 316
|
---|
74 | atom = 317
|
---|
75 | listmaker = 318
|
---|
76 | testlist_gexp = 319
|
---|
77 | lambdef = 320
|
---|
78 | trailer = 321
|
---|
79 | subscriptlist = 322
|
---|
80 | subscript = 323
|
---|
81 | sliceop = 324
|
---|
82 | exprlist = 325
|
---|
83 | testlist = 326
|
---|
84 | dictmaker = 327
|
---|
85 | classdef = 328
|
---|
86 | arglist = 329
|
---|
87 | argument = 330
|
---|
88 | list_iter = 331
|
---|
89 | list_for = 332
|
---|
90 | list_if = 333
|
---|
91 | gen_iter = 334
|
---|
92 | gen_for = 335
|
---|
93 | gen_if = 336
|
---|
94 | testlist1 = 337
|
---|
95 | encoding_decl = 338
|
---|
96 | yield_expr = 339
|
---|
97 | #--end constants--
|
---|
98 |
|
---|
99 | sym_name = {}
|
---|
100 | for _name, _value in globals().items():
|
---|
101 | if type(_value) is type(0):
|
---|
102 | sym_name[_value] = _name
|
---|
103 |
|
---|
104 |
|
---|
105 | def main():
|
---|
106 | import sys
|
---|
107 | import token
|
---|
108 | if len(sys.argv) == 1:
|
---|
109 | sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"]
|
---|
110 | token.main()
|
---|
111 |
|
---|
112 | if __name__ == "__main__":
|
---|
113 | main()
|
---|
Note:
See
TracBrowser
for help on using the repository browser.