blob: cb57208005e5272f17c9f09efcb1ab6125b2d862 [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
38import_as_name = 281
39dotted_as_name = 282
40dotted_name = 283
41global_stmt = 284
42exec_stmt = 285
43assert_stmt = 286
44compound_stmt = 287
45if_stmt = 288
46while_stmt = 289
47for_stmt = 290
48try_stmt = 291
49except_clause = 292
50suite = 293
51test = 294
52and_test = 295
53not_test = 296
54comparison = 297
55comp_op = 298
56expr = 299
57xor_expr = 300
58and_expr = 301
59shift_expr = 302
60arith_expr = 303
61term = 304
62factor = 305
63power = 306
64atom = 307
65listmaker = 308
66testlist_gexp = 309
67lambdef = 310
68trailer = 311
69subscriptlist = 312
70subscript = 313
71sliceop = 314
72exprlist = 315
73testlist = 316
74testlist_safe = 317
75dictmaker = 318
76classdef = 319
77arglist = 320
78argument = 321
79list_iter = 322
80list_for = 323
81list_if = 324
82gen_iter = 325
83gen_for = 326
84gen_if = 327
85testlist1 = 328
86encoding_decl = 329
Guido van Rossum47478871996-08-21 14:32:37 +000087#--end constants--
Guido van Rossumb31c7f71993-11-11 10:31:23 +000088
Guido van Rossumb31c7f71993-11-11 10:31:23 +000089sym_name = {}
Fred Drakedc1a0721997-10-06 21:06:29 +000090for _name, _value in globals().items():
91 if type(_value) is type(0):
Guido van Rossum45e2fbc1998-03-26 21:13:24 +000092 sym_name[_value] = _name
Guido van Rossum47478871996-08-21 14:32:37 +000093
94
95def main():
96 import sys
97 import token
98 if len(sys.argv) == 1:
Guido van Rossum45e2fbc1998-03-26 21:13:24 +000099 sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"]
Guido van Rossum47478871996-08-21 14:32:37 +0000100 token.main()
101
102if __name__ == "__main__":
103 main()