Commit | Line | Data |
---|---|---|
920dae64 AT |
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-- | |
13 | single_input = 256 | |
14 | file_input = 257 | |
15 | eval_input = 258 | |
16 | decorator = 259 | |
17 | decorators = 260 | |
18 | funcdef = 261 | |
19 | parameters = 262 | |
20 | varargslist = 263 | |
21 | fpdef = 264 | |
22 | fplist = 265 | |
23 | stmt = 266 | |
24 | simple_stmt = 267 | |
25 | small_stmt = 268 | |
26 | expr_stmt = 269 | |
27 | augassign = 270 | |
28 | print_stmt = 271 | |
29 | del_stmt = 272 | |
30 | pass_stmt = 273 | |
31 | flow_stmt = 274 | |
32 | break_stmt = 275 | |
33 | continue_stmt = 276 | |
34 | return_stmt = 277 | |
35 | yield_stmt = 278 | |
36 | raise_stmt = 279 | |
37 | import_stmt = 280 | |
38 | import_name = 281 | |
39 | import_from = 282 | |
40 | import_as_name = 283 | |
41 | dotted_as_name = 284 | |
42 | import_as_names = 285 | |
43 | dotted_as_names = 286 | |
44 | dotted_name = 287 | |
45 | global_stmt = 288 | |
46 | exec_stmt = 289 | |
47 | assert_stmt = 290 | |
48 | compound_stmt = 291 | |
49 | if_stmt = 292 | |
50 | while_stmt = 293 | |
51 | for_stmt = 294 | |
52 | try_stmt = 295 | |
53 | except_clause = 296 | |
54 | suite = 297 | |
55 | test = 298 | |
56 | and_test = 299 | |
57 | not_test = 300 | |
58 | comparison = 301 | |
59 | comp_op = 302 | |
60 | expr = 303 | |
61 | xor_expr = 304 | |
62 | and_expr = 305 | |
63 | shift_expr = 306 | |
64 | arith_expr = 307 | |
65 | term = 308 | |
66 | factor = 309 | |
67 | power = 310 | |
68 | atom = 311 | |
69 | listmaker = 312 | |
70 | testlist_gexp = 313 | |
71 | lambdef = 314 | |
72 | trailer = 315 | |
73 | subscriptlist = 316 | |
74 | subscript = 317 | |
75 | sliceop = 318 | |
76 | exprlist = 319 | |
77 | testlist = 320 | |
78 | testlist_safe = 321 | |
79 | dictmaker = 322 | |
80 | classdef = 323 | |
81 | arglist = 324 | |
82 | argument = 325 | |
83 | list_iter = 326 | |
84 | list_for = 327 | |
85 | list_if = 328 | |
86 | gen_iter = 329 | |
87 | gen_for = 330 | |
88 | gen_if = 331 | |
89 | testlist1 = 332 | |
90 | encoding_decl = 333 | |
91 | #--end constants-- | |
92 | ||
93 | sym_name = {} | |
94 | for _name, _value in globals().items(): | |
95 | if type(_value) is type(0): | |
96 | sym_name[_value] = _name | |
97 | ||
98 | ||
99 | def main(): | |
100 | import sys | |
101 | import token | |
102 | if len(sys.argv) == 1: | |
103 | sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"] | |
104 | token.main() | |
105 | ||
106 | if __name__ == "__main__": | |
107 | main() |