blob: 658974cbad3b593e94e5f00c48aad344a92bf2a3 [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
33print_stmt = 276
34del_stmt = 277
35pass_stmt = 278
36flow_stmt = 279
37break_stmt = 280
38continue_stmt = 281
39return_stmt = 282
40yield_stmt = 283
41raise_stmt = 284
42import_stmt = 285
43import_name = 286
44import_from = 287
45import_as_name = 288
46dotted_as_name = 289
47import_as_names = 290
48dotted_as_names = 291
49dotted_name = 292
50global_stmt = 293
51assert_stmt = 294
52compound_stmt = 295
53if_stmt = 296
54while_stmt = 297
55for_stmt = 298
56try_stmt = 299
57with_stmt = 300
58with_var = 301
59except_clause = 302
60suite = 303
61testlist_safe = 304
62old_test = 305
63old_lambdef = 306
64test = 307
65or_test = 308
66and_test = 309
67not_test = 310
68comparison = 311
69comp_op = 312
70expr = 313
71xor_expr = 314
72and_expr = 315
73shift_expr = 316
74arith_expr = 317
75term = 318
76factor = 319
77power = 320
78atom = 321
79listmaker = 322
80testlist_gexp = 323
81lambdef = 324
82trailer = 325
83subscriptlist = 326
84subscript = 327
85sliceop = 328
86exprlist = 329
87testlist = 330
88dictsetmaker = 331
89classdef = 332
90arglist = 333
91argument = 334
92list_iter = 335
93list_for = 336
94list_if = 337
95gen_iter = 338
96gen_for = 339
97gen_if = 340
98testlist1 = 341
99encoding_decl = 342
100yield_expr = 343
Guido van Rossum47478871996-08-21 14:32:37 +0000101#--end constants--
Guido van Rossumb31c7f71993-11-11 10:31:23 +0000102
Guido van Rossumb31c7f71993-11-11 10:31:23 +0000103sym_name = {}
Fred Drakedc1a0721997-10-06 21:06:29 +0000104for _name, _value in globals().items():
105 if type(_value) is type(0):
Guido van Rossum45e2fbc1998-03-26 21:13:24 +0000106 sym_name[_value] = _name
Guido van Rossum47478871996-08-21 14:32:37 +0000107
108
109def main():
110 import sys
111 import token
112 if len(sys.argv) == 1:
Guido van Rossum45e2fbc1998-03-26 21:13:24 +0000113 sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"]
Guido van Rossum47478871996-08-21 14:32:37 +0000114 token.main()
115
116if __name__ == "__main__":
117 main()