source: trunk/essentials/dev-lang/python/Lib/symbol.py

Last change on this file was 3225, checked in by bird, 18 years ago

Python 2.5

File size: 2.0 KB
Line 
1#! /usr/bin/env python
2
3"""Non-terminal symbols of Python grammar (from "graminit.h")."""
4
5# 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#
10# python Lib/symbol.py
11
12#--start constants--
13single_input = 256
14file_input = 257
15eval_input = 258
16decorator = 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_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
46exec_stmt = 289
47assert_stmt = 290
48compound_stmt = 291
49if_stmt = 292
50while_stmt = 293
51for_stmt = 294
52try_stmt = 295
53with_stmt = 296
54with_var = 297
55except_clause = 298
56suite = 299
57testlist_safe = 300
58old_test = 301
59old_lambdef = 302
60test = 303
61or_test = 304
62and_test = 305
63not_test = 306
64comparison = 307
65comp_op = 308
66expr = 309
67xor_expr = 310
68and_expr = 311
69shift_expr = 312
70arith_expr = 313
71term = 314
72factor = 315
73power = 316
74atom = 317
75listmaker = 318
76testlist_gexp = 319
77lambdef = 320
78trailer = 321
79subscriptlist = 322
80subscript = 323
81sliceop = 324
82exprlist = 325
83testlist = 326
84dictmaker = 327
85classdef = 328
86arglist = 329
87argument = 330
88list_iter = 331
89list_for = 332
90list_if = 333
91gen_iter = 334
92gen_for = 335
93gen_if = 336
94testlist1 = 337
95encoding_decl = 338
96yield_expr = 339
97#--end constants--
98
99sym_name = {}
100for _name, _value in globals().items():
101 if type(_value) is type(0):
102 sym_name[_value] = _name
103
104
105def main():
106 import sys
107 import token
108 if len(sys.argv) == 1:
109 sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"]
110 token.main()
111
112if __name__ == "__main__":
113 main()
Note: See TracBrowser for help on using the repository browser.