• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""Non-terminal symbols of Python grammar (from "graminit.h")."""
2
3#  This file is automatically generated; please don't muck it up!
4#
5#  To update the symbols in this file, 'cd' to the top directory of
6#  the python source tree after building the interpreter and run:
7#
8#    python3 Tools/scripts/generate_symbol_py.py Include/graminit.h Lib/symbol.py
9#
10# or just
11#
12#    make regen-symbol
13
14import warnings
15
16warnings.warn(
17    "The symbol module is deprecated and will be removed "
18    "in future versions of Python",
19    DeprecationWarning,
20    stacklevel=2,
21)
22
23#--start constants--
24single_input = 256
25file_input = 257
26eval_input = 258
27decorator = 259
28decorators = 260
29decorated = 261
30async_funcdef = 262
31funcdef = 263
32parameters = 264
33typedargslist = 265
34tfpdef = 266
35varargslist = 267
36vfpdef = 268
37stmt = 269
38simple_stmt = 270
39small_stmt = 271
40expr_stmt = 272
41annassign = 273
42testlist_star_expr = 274
43augassign = 275
44del_stmt = 276
45pass_stmt = 277
46flow_stmt = 278
47break_stmt = 279
48continue_stmt = 280
49return_stmt = 281
50yield_stmt = 282
51raise_stmt = 283
52import_stmt = 284
53import_name = 285
54import_from = 286
55import_as_name = 287
56dotted_as_name = 288
57import_as_names = 289
58dotted_as_names = 290
59dotted_name = 291
60global_stmt = 292
61nonlocal_stmt = 293
62assert_stmt = 294
63compound_stmt = 295
64async_stmt = 296
65if_stmt = 297
66while_stmt = 298
67for_stmt = 299
68try_stmt = 300
69with_stmt = 301
70with_item = 302
71except_clause = 303
72suite = 304
73namedexpr_test = 305
74test = 306
75test_nocond = 307
76lambdef = 308
77lambdef_nocond = 309
78or_test = 310
79and_test = 311
80not_test = 312
81comparison = 313
82comp_op = 314
83star_expr = 315
84expr = 316
85xor_expr = 317
86and_expr = 318
87shift_expr = 319
88arith_expr = 320
89term = 321
90factor = 322
91power = 323
92atom_expr = 324
93atom = 325
94testlist_comp = 326
95trailer = 327
96subscriptlist = 328
97subscript = 329
98sliceop = 330
99exprlist = 331
100testlist = 332
101dictorsetmaker = 333
102classdef = 334
103arglist = 335
104argument = 336
105comp_iter = 337
106sync_comp_for = 338
107comp_for = 339
108comp_if = 340
109encoding_decl = 341
110yield_expr = 342
111yield_arg = 343
112func_body_suite = 344
113func_type_input = 345
114func_type = 346
115typelist = 347
116#--end constants--
117
118sym_name = {}
119for _name, _value in list(globals().items()):
120    if type(_value) is type(0):
121        sym_name[_value] = _name
122del _name, _value
123