• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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--
13single_input = 256
14file_input = 257
15eval_input = 258
16decorator = 259
17decorators = 260
18decorated = 261
19funcdef = 262
20parameters = 263
21varargslist = 264
22fpdef = 265
23fplist = 266
24stmt = 267
25simple_stmt = 268
26small_stmt = 269
27expr_stmt = 270
28augassign = 271
29print_stmt = 272
30del_stmt = 273
31pass_stmt = 274
32flow_stmt = 275
33break_stmt = 276
34continue_stmt = 277
35return_stmt = 278
36yield_stmt = 279
37raise_stmt = 280
38import_stmt = 281
39import_name = 282
40import_from = 283
41import_as_name = 284
42dotted_as_name = 285
43import_as_names = 286
44dotted_as_names = 287
45dotted_name = 288
46global_stmt = 289
47exec_stmt = 290
48assert_stmt = 291
49compound_stmt = 292
50if_stmt = 293
51while_stmt = 294
52for_stmt = 295
53try_stmt = 296
54with_stmt = 297
55with_item = 298
56except_clause = 299
57suite = 300
58testlist_safe = 301
59old_test = 302
60old_lambdef = 303
61test = 304
62or_test = 305
63and_test = 306
64not_test = 307
65comparison = 308
66comp_op = 309
67expr = 310
68xor_expr = 311
69and_expr = 312
70shift_expr = 313
71arith_expr = 314
72term = 315
73factor = 316
74power = 317
75atom = 318
76listmaker = 319
77testlist_comp = 320
78lambdef = 321
79trailer = 322
80subscriptlist = 323
81subscript = 324
82sliceop = 325
83exprlist = 326
84testlist = 327
85dictorsetmaker = 328
86classdef = 329
87arglist = 330
88argument = 331
89list_iter = 332
90list_for = 333
91list_if = 334
92comp_iter = 335
93comp_for = 336
94comp_if = 337
95testlist1 = 338
96encoding_decl = 339
97yield_expr = 340
98#--end constants--
99
100sym_name = {}
101for _name, _value in globals().items():
102    if type(_value) is type(0):
103        sym_name[_value] = _name
104
105
106def main():
107    import sys
108    import token
109    if len(sys.argv) == 1:
110        sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"]
111    token.main()
112
113if __name__ == "__main__":
114    main()
115