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