blob: eaf5a2581d34466367205f672cf4a43ecda01239 [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
20varargslist = 263
21fpdef = 264
22fplist = 265
23stmt = 266
24simple_stmt = 267
25small_stmt = 268
26expr_stmt = 269
27augassign = 270
28print_stmt = 271
29del_stmt = 272
30pass_stmt = 273
31flow_stmt = 274
32break_stmt = 275
33continue_stmt = 276
34return_stmt = 277
35yield_stmt = 278
36raise_stmt = 279
37import_stmt = 280
Anthony Baxter1a4ddae2004-08-31 10:07:13 +000038import_name = 281
39import_from = 282
40import_as_name = 283
41dotted_as_name = 284
42import_as_names = 285
43dotted_as_names = 286
44dotted_name = 287
45global_stmt = 288
46exec_stmt = 289
47assert_stmt = 290
48compound_stmt = 291
49if_stmt = 292
50while_stmt = 293
51for_stmt = 294
52try_stmt = 295
53except_clause = 296
54suite = 297
55test = 298
56and_test = 299
57not_test = 300
58comparison = 301
59comp_op = 302
60expr = 303
61xor_expr = 304
62and_expr = 305
63shift_expr = 306
64arith_expr = 307
65term = 308
66factor = 309
67power = 310
68atom = 311
69listmaker = 312
70testlist_gexp = 313
71lambdef = 314
72trailer = 315
73subscriptlist = 316
74subscript = 317
75sliceop = 318
76exprlist = 319
77testlist = 320
78testlist_safe = 321
79dictmaker = 322
80classdef = 323
81arglist = 324
82argument = 325
83list_iter = 326
84list_for = 327
85list_if = 328
86gen_iter = 329
87gen_for = 330
88gen_if = 331
89testlist1 = 332
90encoding_decl = 333
Guido van Rossum47478871996-08-21 14:32:37 +000091#--end constants--
Guido van Rossumb31c7f71993-11-11 10:31:23 +000092
Guido van Rossumb31c7f71993-11-11 10:31:23 +000093sym_name = {}
Fred Drakedc1a0721997-10-06 21:06:29 +000094for _name, _value in globals().items():
95 if type(_value) is type(0):
Guido van Rossum45e2fbc1998-03-26 21:13:24 +000096 sym_name[_value] = _name
Guido van Rossum47478871996-08-21 14:32:37 +000097
98
99def main():
100 import sys
101 import token
102 if len(sys.argv) == 1:
Guido van Rossum45e2fbc1998-03-26 21:13:24 +0000103 sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"]
Guido van Rossum47478871996-08-21 14:32:37 +0000104 token.main()
105
106if __name__ == "__main__":
107 main()