1 | n/a | #! /usr/bin/env python3 |
---|
2 | n/a | |
---|
3 | n/a | """Non-terminal symbols of Python grammar (from "graminit.h").""" |
---|
4 | n/a | |
---|
5 | n/a | # This file is automatically generated; please don't muck it up! |
---|
6 | n/a | # |
---|
7 | n/a | # To update the symbols in this file, 'cd' to the top directory of |
---|
8 | n/a | # the python source tree after building the interpreter and run: |
---|
9 | n/a | # |
---|
10 | n/a | # ./python Lib/symbol.py |
---|
11 | n/a | |
---|
12 | n/a | #--start constants-- |
---|
13 | n/a | single_input = 256 |
---|
14 | n/a | file_input = 257 |
---|
15 | n/a | eval_input = 258 |
---|
16 | n/a | decorator = 259 |
---|
17 | n/a | decorators = 260 |
---|
18 | n/a | decorated = 261 |
---|
19 | n/a | async_funcdef = 262 |
---|
20 | n/a | funcdef = 263 |
---|
21 | n/a | parameters = 264 |
---|
22 | n/a | typedargslist = 265 |
---|
23 | n/a | tfpdef = 266 |
---|
24 | n/a | varargslist = 267 |
---|
25 | n/a | vfpdef = 268 |
---|
26 | n/a | stmt = 269 |
---|
27 | n/a | simple_stmt = 270 |
---|
28 | n/a | small_stmt = 271 |
---|
29 | n/a | expr_stmt = 272 |
---|
30 | n/a | annassign = 273 |
---|
31 | n/a | testlist_star_expr = 274 |
---|
32 | n/a | augassign = 275 |
---|
33 | n/a | del_stmt = 276 |
---|
34 | n/a | pass_stmt = 277 |
---|
35 | n/a | flow_stmt = 278 |
---|
36 | n/a | break_stmt = 279 |
---|
37 | n/a | continue_stmt = 280 |
---|
38 | n/a | return_stmt = 281 |
---|
39 | n/a | yield_stmt = 282 |
---|
40 | n/a | raise_stmt = 283 |
---|
41 | n/a | import_stmt = 284 |
---|
42 | n/a | import_name = 285 |
---|
43 | n/a | import_from = 286 |
---|
44 | n/a | import_as_name = 287 |
---|
45 | n/a | dotted_as_name = 288 |
---|
46 | n/a | import_as_names = 289 |
---|
47 | n/a | dotted_as_names = 290 |
---|
48 | n/a | dotted_name = 291 |
---|
49 | n/a | global_stmt = 292 |
---|
50 | n/a | nonlocal_stmt = 293 |
---|
51 | n/a | assert_stmt = 294 |
---|
52 | n/a | compound_stmt = 295 |
---|
53 | n/a | async_stmt = 296 |
---|
54 | n/a | if_stmt = 297 |
---|
55 | n/a | while_stmt = 298 |
---|
56 | n/a | for_stmt = 299 |
---|
57 | n/a | try_stmt = 300 |
---|
58 | n/a | with_stmt = 301 |
---|
59 | n/a | with_item = 302 |
---|
60 | n/a | except_clause = 303 |
---|
61 | n/a | suite = 304 |
---|
62 | n/a | test = 305 |
---|
63 | n/a | test_nocond = 306 |
---|
64 | n/a | lambdef = 307 |
---|
65 | n/a | lambdef_nocond = 308 |
---|
66 | n/a | or_test = 309 |
---|
67 | n/a | and_test = 310 |
---|
68 | n/a | not_test = 311 |
---|
69 | n/a | comparison = 312 |
---|
70 | n/a | comp_op = 313 |
---|
71 | n/a | star_expr = 314 |
---|
72 | n/a | expr = 315 |
---|
73 | n/a | xor_expr = 316 |
---|
74 | n/a | and_expr = 317 |
---|
75 | n/a | shift_expr = 318 |
---|
76 | n/a | arith_expr = 319 |
---|
77 | n/a | term = 320 |
---|
78 | n/a | factor = 321 |
---|
79 | n/a | power = 322 |
---|
80 | n/a | atom_expr = 323 |
---|
81 | n/a | atom = 324 |
---|
82 | n/a | testlist_comp = 325 |
---|
83 | n/a | trailer = 326 |
---|
84 | n/a | subscriptlist = 327 |
---|
85 | n/a | subscript = 328 |
---|
86 | n/a | sliceop = 329 |
---|
87 | n/a | exprlist = 330 |
---|
88 | n/a | testlist = 331 |
---|
89 | n/a | dictorsetmaker = 332 |
---|
90 | n/a | classdef = 333 |
---|
91 | n/a | arglist = 334 |
---|
92 | n/a | argument = 335 |
---|
93 | n/a | comp_iter = 336 |
---|
94 | n/a | comp_for = 337 |
---|
95 | n/a | comp_if = 338 |
---|
96 | n/a | encoding_decl = 339 |
---|
97 | n/a | yield_expr = 340 |
---|
98 | n/a | yield_arg = 341 |
---|
99 | n/a | #--end constants-- |
---|
100 | n/a | |
---|
101 | n/a | sym_name = {} |
---|
102 | n/a | for _name, _value in list(globals().items()): |
---|
103 | n/a | if type(_value) is type(0): |
---|
104 | n/a | sym_name[_value] = _name |
---|
105 | n/a | |
---|
106 | n/a | |
---|
107 | n/a | def _main(): |
---|
108 | n/a | import sys |
---|
109 | n/a | import token |
---|
110 | n/a | if len(sys.argv) == 1: |
---|
111 | n/a | sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"] |
---|
112 | n/a | token._main() |
---|
113 | n/a | |
---|
114 | n/a | if __name__ == "__main__": |
---|
115 | n/a | _main() |
---|