blob: 86aa2d052dbea573f5111518983ca64eff70b640 [file] [log] [blame]
Guido van Rossum47478871996-08-21 14:32:37 +00001#! /usr/bin/env python
Guido van Rossume7b146f2000-02-04 15:28:42 +00002
3"""Non-terminal symbols of Python grammar (from "graminit.h")."""
4
Guido van Rossum47478871996-08-21 14:32:37 +00005# 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#
Guido van Rossumf7a8b451997-10-22 20:54:50 +000010# python Lib/symbol.py
Guido van Rossumb31c7f71993-11-11 10:31:23 +000011
Guido van Rossum47478871996-08-21 14:32:37 +000012#--start constants--
Guido van Rossumb31c7f71993-11-11 10:31:23 +000013single_input = 256
14file_input = 257
15eval_input = 258
Anthony Baxterc2a5a632004-08-02 06:10:11 +000016decorator = 259
17decorators = 260
18funcdef = 261
19parameters = 262
Neal Norwitzc1505362006-12-28 06:47:50 +000020typedargslist = 263
21tname = 264
22tfpdef = 265
23tfplist = 266
24varargslist = 267
25vname = 268
26vfpdef = 269
27vfplist = 270
28stmt = 271
29simple_stmt = 272
30small_stmt = 273
31expr_stmt = 274
32augassign = 275
Georg Brandl88fc6642007-02-09 21:28:07 +000033del_stmt = 276
34pass_stmt = 277
35flow_stmt = 278
36break_stmt = 279
37continue_stmt = 280
38return_stmt = 281
39yield_stmt = 282
40raise_stmt = 283
41import_stmt = 284
42import_name = 285
43import_from = 286
44import_as_name = 287
45dotted_as_name = 288
46import_as_names = 289
47dotted_as_names = 290
48dotted_name = 291
49global_stmt = 292
50assert_stmt = 293
51compound_stmt = 294
52if_stmt = 295
53while_stmt = 296
54for_stmt = 297
55try_stmt = 298
56with_stmt = 299
57with_var = 300
58except_clause = 301
59suite = 302
60testlist_safe = 303
61old_test = 304
62old_lambdef = 305
63test = 306
64or_test = 307
65and_test = 308
66not_test = 309
67comparison = 310
68comp_op = 311
69expr = 312
70xor_expr = 313
71and_expr = 314
72shift_expr = 315
73arith_expr = 316
74term = 317
75factor = 318
76power = 319
77atom = 320
78listmaker = 321
79testlist_gexp = 322
80lambdef = 323
81trailer = 324
82subscriptlist = 325
83subscript = 326
84sliceop = 327
85exprlist = 328
86testlist = 329
87dictsetmaker = 330
88classdef = 331
89arglist = 332
90argument = 333
91list_iter = 334
92list_for = 335
93list_if = 336
94gen_iter = 337
95gen_for = 338
96gen_if = 339
97testlist1 = 340
98encoding_decl = 341
99yield_expr = 342
Guido van Rossum47478871996-08-21 14:32:37 +0000100#--end constants--
Guido van Rossumb31c7f71993-11-11 10:31:23 +0000101
Guido van Rossumb31c7f71993-11-11 10:31:23 +0000102sym_name = {}
Guido van Rossumcc2b0162007-02-11 06:12:03 +0000103for _name, _value in list(globals().items()):
Fred Drakedc1a0721997-10-06 21:06:29 +0000104 if type(_value) is type(0):
Guido van Rossum45e2fbc1998-03-26 21:13:24 +0000105 sym_name[_value] = _name
Guido van Rossum47478871996-08-21 14:32:37 +0000106
107
108def main():
109 import sys
110 import token
111 if len(sys.argv) == 1:
Guido van Rossum45e2fbc1998-03-26 21:13:24 +0000112 sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"]
Guido van Rossum47478871996-08-21 14:32:37 +0000113 token.main()
114
115if __name__ == "__main__":
116 main()