blob: aaac8c914431bb80242adcf65dd92a6c37af55f3 [file] [log] [blame]
Guido van Rossume7b146f2000-02-04 15:28:42 +00001"""Non-terminal symbols of Python grammar (from "graminit.h")."""
2
Guido van Rossum47478871996-08-21 14:32:37 +00003# 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#
Serhiy Storchaka8ac65812018-12-22 11:18:40 +02008# python3 Tools/scripts/generate_symbol_py.py Include/graminit.h Lib/symbol.py
9#
10# or just
11#
12# make regen-symbol
Guido van Rossumb31c7f71993-11-11 10:31:23 +000013
Miss Islington (bot)96d91072020-05-31 15:23:29 -070014import 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
Guido van Rossum47478871996-08-21 14:32:37 +000023#--start constants--
Guido van Rossumb31c7f71993-11-11 10:31:23 +000024single_input = 256
25file_input = 257
26eval_input = 258
Anthony Baxterc2a5a632004-08-02 06:10:11 +000027decorator = 259
28decorators = 260
Georg Brandl39cf04b2007-08-31 07:58:27 +000029decorated = 261
Yury Selivanov01098122015-05-27 11:08:19 -040030async_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
Yury Selivanovf8cb8a12016-09-08 20:50:03 -070041annassign = 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
Emily Morehouse8f59ee02019-01-24 16:49:56 -070073namedexpr_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
Guido van Rossumdcfcd142019-01-31 03:40:27 -0800112func_body_suite = 344
113func_type_input = 345
114func_type = 346
115typelist = 347
Guido van Rossum47478871996-08-21 14:32:37 +0000116#--end constants--
Guido van Rossumb31c7f71993-11-11 10:31:23 +0000117
Guido van Rossumb31c7f71993-11-11 10:31:23 +0000118sym_name = {}
Guido van Rossumcc2b0162007-02-11 06:12:03 +0000119for _name, _value in list(globals().items()):
Fred Drakedc1a0721997-10-06 21:06:29 +0000120 if type(_value) is type(0):
Guido van Rossum45e2fbc1998-03-26 21:13:24 +0000121 sym_name[_value] = _name
Serhiy Storchaka8ac65812018-12-22 11:18:40 +0200122del _name, _value