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