blob: c65013813cca04f5289b4cdc8c76fbc3d000dacf [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
Guido van Rossumc2e20742006-02-27 22:32:47 +000053with_stmt = 296
54with_var = 297
55except_clause = 298
56suite = 299
57testlist_safe = 300
58old_test = 301
59old_lambdef = 302
60test = 303
61or_test = 304
62and_test = 305
63not_test = 306
64comparison = 307
65comp_op = 308
66expr = 309
67xor_expr = 310
68and_expr = 311
69shift_expr = 312
70arith_expr = 313
71term = 314
72factor = 315
73power = 316
74atom = 317
75listmaker = 318
76testlist_gexp = 319
77lambdef = 320
78trailer = 321
79subscriptlist = 322
80subscript = 323
81sliceop = 324
82exprlist = 325
83testlist = 326
84dictmaker = 327
85classdef = 328
86arglist = 329
87argument = 330
88list_iter = 331
89list_for = 332
90list_if = 333
91gen_iter = 334
92gen_for = 335
93gen_if = 336
94testlist1 = 337
95encoding_decl = 338
96yield_expr = 339
Guido van Rossum47478871996-08-21 14:32:37 +000097#--end constants--
Guido van Rossumb31c7f71993-11-11 10:31:23 +000098
Guido van Rossumb31c7f71993-11-11 10:31:23 +000099sym_name = {}
Fred Drakedc1a0721997-10-06 21:06:29 +0000100for _name, _value in globals().items():
101 if type(_value) is type(0):
Guido van Rossum45e2fbc1998-03-26 21:13:24 +0000102 sym_name[_value] = _name
Guido van Rossum47478871996-08-21 14:32:37 +0000103
104
105def main():
106 import sys
107 import token
108 if len(sys.argv) == 1:
Guido van Rossum45e2fbc1998-03-26 21:13:24 +0000109 sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"]
Guido van Rossum47478871996-08-21 14:32:37 +0000110 token.main()
111
112if __name__ == "__main__":
113 main()