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