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