blob: fc3c34ae83eb88bc64e2d7ed50974a193e0dc72a [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
Benjamin Peterson6a098d22009-06-09 21:13:43 +000055with_item = 298
Christian Heimes5224d282008-02-23 15:01:05 +000056except_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
Alexandre Vassalottib6465472010-01-11 22:36:12 +000077testlist_comp = 320
Christian Heimes5224d282008-02-23 15:01:05 +000078lambdef = 321
79trailer = 322
80subscriptlist = 323
81subscript = 324
82sliceop = 325
83exprlist = 326
84testlist = 327
85dictmaker = 328
Alexandre Vassalottiee936a22010-01-09 23:35:54 +000086dictorsetmaker = 329
87classdef = 330
88arglist = 331
89argument = 332
90list_iter = 333
91list_for = 334
92list_if = 335
Alexandre Vassalottib6465472010-01-11 22:36:12 +000093comp_iter = 336
94comp_for = 337
95comp_if = 338
Alexandre Vassalottiee936a22010-01-09 23:35:54 +000096testlist1 = 339
97encoding_decl = 340
98yield_expr = 341
Guido van Rossum47478871996-08-21 14:32:37 +000099#--end constants--
Guido van Rossumb31c7f71993-11-11 10:31:23 +0000100
Guido van Rossumb31c7f71993-11-11 10:31:23 +0000101sym_name = {}
Fred Drakedc1a0721997-10-06 21:06:29 +0000102for _name, _value in globals().items():
103 if type(_value) is type(0):
Guido van Rossum45e2fbc1998-03-26 21:13:24 +0000104 sym_name[_value] = _name
Guido van Rossum47478871996-08-21 14:32:37 +0000105
106
107def main():
108 import sys
109 import token
110 if len(sys.argv) == 1:
Guido van Rossum45e2fbc1998-03-26 21:13:24 +0000111 sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"]
Guido van Rossum47478871996-08-21 14:32:37 +0000112 token.main()
113
114if __name__ == "__main__":
115 main()