blob: 36e0eec7ac1f5df02a51a69c67357df2d9509243 [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
Guido van Rossum47478871996-08-21 14:32:37 +000014#--start constants--
Guido van Rossumb31c7f71993-11-11 10:31:23 +000015single_input = 256
16file_input = 257
17eval_input = 258
Anthony Baxterc2a5a632004-08-02 06:10:11 +000018decorator = 259
19decorators = 260
Georg Brandl39cf04b2007-08-31 07:58:27 +000020decorated = 261
Yury Selivanov01098122015-05-27 11:08:19 -040021async_funcdef = 262
22funcdef = 263
23parameters = 264
24typedargslist = 265
25tfpdef = 266
26varargslist = 267
27vfpdef = 268
28stmt = 269
29simple_stmt = 270
30small_stmt = 271
31expr_stmt = 272
Yury Selivanovf8cb8a12016-09-08 20:50:03 -070032annassign = 273
33testlist_star_expr = 274
34augassign = 275
35del_stmt = 276
36pass_stmt = 277
37flow_stmt = 278
38break_stmt = 279
39continue_stmt = 280
40return_stmt = 281
41yield_stmt = 282
42raise_stmt = 283
43import_stmt = 284
44import_name = 285
45import_from = 286
46import_as_name = 287
47dotted_as_name = 288
48import_as_names = 289
49dotted_as_names = 290
50dotted_name = 291
51global_stmt = 292
52nonlocal_stmt = 293
53assert_stmt = 294
54compound_stmt = 295
55async_stmt = 296
56if_stmt = 297
57while_stmt = 298
58for_stmt = 299
59try_stmt = 300
60with_stmt = 301
61with_item = 302
62except_clause = 303
63suite = 304
Emily Morehouse8f59ee02019-01-24 16:49:56 -070064namedexpr_test = 305
65test = 306
66test_nocond = 307
67lambdef = 308
68lambdef_nocond = 309
69or_test = 310
70and_test = 311
71not_test = 312
72comparison = 313
73comp_op = 314
74star_expr = 315
75expr = 316
76xor_expr = 317
77and_expr = 318
78shift_expr = 319
79arith_expr = 320
80term = 321
81factor = 322
82power = 323
83atom_expr = 324
84atom = 325
85testlist_comp = 326
86trailer = 327
87subscriptlist = 328
88subscript = 329
89sliceop = 330
90exprlist = 331
91testlist = 332
92dictorsetmaker = 333
93classdef = 334
94arglist = 335
95argument = 336
96comp_iter = 337
97sync_comp_for = 338
98comp_for = 339
99comp_if = 340
100encoding_decl = 341
101yield_expr = 342
102yield_arg = 343
Guido van Rossumdcfcd142019-01-31 03:40:27 -0800103func_body_suite = 344
104func_type_input = 345
105func_type = 346
106typelist = 347
Guido van Rossum47478871996-08-21 14:32:37 +0000107#--end constants--
Guido van Rossumb31c7f71993-11-11 10:31:23 +0000108
Guido van Rossumb31c7f71993-11-11 10:31:23 +0000109sym_name = {}
Guido van Rossumcc2b0162007-02-11 06:12:03 +0000110for _name, _value in list(globals().items()):
Fred Drakedc1a0721997-10-06 21:06:29 +0000111 if type(_value) is type(0):
Guido van Rossum45e2fbc1998-03-26 21:13:24 +0000112 sym_name[_value] = _name
Serhiy Storchaka8ac65812018-12-22 11:18:40 +0200113del _name, _value