blob: 38c61931794202c87b4750548674fe283278a167 [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
Guido van Rossumb6775db1994-08-01 11:34:53 +000016funcdef = 259
17parameters = 260
18varargslist = 261
19fpdef = 262
20fplist = 263
21stmt = 264
22simple_stmt = 265
23small_stmt = 266
24expr_stmt = 267
Thomas Wouters34052622000-08-24 21:08:39 +000025augassign = 268
26print_stmt = 269
27del_stmt = 270
28pass_stmt = 271
29flow_stmt = 272
30break_stmt = 273
31continue_stmt = 274
32return_stmt = 275
Guido van Rossum6e735c92001-07-13 18:05:46 +000033yield_stmt = 276
34raise_stmt = 277
35import_stmt = 278
36import_as_name = 279
37dotted_as_name = 280
38dotted_name = 281
39global_stmt = 282
40exec_stmt = 283
41assert_stmt = 284
42compound_stmt = 285
43if_stmt = 286
44while_stmt = 287
45for_stmt = 288
46try_stmt = 289
47except_clause = 290
48suite = 291
49test = 292
50and_test = 293
51not_test = 294
52comparison = 295
53comp_op = 296
54expr = 297
55xor_expr = 298
56and_expr = 299
57shift_expr = 300
58arith_expr = 301
59term = 302
60factor = 303
61power = 304
62atom = 305
63listmaker = 306
64lambdef = 307
65trailer = 308
66subscriptlist = 309
67subscript = 310
68sliceop = 311
69exprlist = 312
70testlist = 313
Jeremy Hylton4bf1fb62001-10-17 13:13:04 +000071testlist_safe = 314
72dictmaker = 315
73classdef = 316
74arglist = 317
75argument = 318
76list_iter = 319
77list_for = 320
78list_if = 321
Michael W. Hudsonadf16062002-10-03 09:42:01 +000079testlist1 = 322
80encoding_decl = 323
Guido van Rossum47478871996-08-21 14:32:37 +000081#--end constants--
Guido van Rossumb31c7f71993-11-11 10:31:23 +000082
Guido van Rossumb31c7f71993-11-11 10:31:23 +000083sym_name = {}
Fred Drakedc1a0721997-10-06 21:06:29 +000084for _name, _value in globals().items():
85 if type(_value) is type(0):
Guido van Rossum45e2fbc1998-03-26 21:13:24 +000086 sym_name[_value] = _name
Guido van Rossum47478871996-08-21 14:32:37 +000087
88
89def main():
90 import sys
91 import token
92 if len(sys.argv) == 1:
Guido van Rossum45e2fbc1998-03-26 21:13:24 +000093 sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"]
Guido van Rossum47478871996-08-21 14:32:37 +000094 token.main()
95
96if __name__ == "__main__":
97 main()