Guido van Rossum | e7b146f | 2000-02-04 15:28:42 +0000 | [diff] [blame] | 1 | """Non-terminal symbols of Python grammar (from "graminit.h").""" |
| 2 | |
Guido van Rossum | 4747887 | 1996-08-21 14:32:37 +0000 | [diff] [blame] | 3 | # This file is automatically generated; please don't muck it up! |
| 4 | # |
| 5 | # To update the symbols in this file, 'cd' to the top directory of |
| 6 | # the python source tree after building the interpreter and run: |
| 7 | # |
Serhiy Storchaka | 8ac6581 | 2018-12-22 11:18:40 +0200 | [diff] [blame] | 8 | # python3 Tools/scripts/generate_symbol_py.py Include/graminit.h Lib/symbol.py |
| 9 | # |
| 10 | # or just |
| 11 | # |
| 12 | # make regen-symbol |
Guido van Rossum | b31c7f7 | 1993-11-11 10:31:23 +0000 | [diff] [blame] | 13 | |
Guido van Rossum | 4747887 | 1996-08-21 14:32:37 +0000 | [diff] [blame] | 14 | #--start constants-- |
Guido van Rossum | b31c7f7 | 1993-11-11 10:31:23 +0000 | [diff] [blame] | 15 | single_input = 256 |
| 16 | file_input = 257 |
| 17 | eval_input = 258 |
Anthony Baxter | c2a5a63 | 2004-08-02 06:10:11 +0000 | [diff] [blame] | 18 | decorator = 259 |
| 19 | decorators = 260 |
Georg Brandl | 39cf04b | 2007-08-31 07:58:27 +0000 | [diff] [blame] | 20 | decorated = 261 |
Yury Selivanov | 0109812 | 2015-05-27 11:08:19 -0400 | [diff] [blame] | 21 | async_funcdef = 262 |
| 22 | funcdef = 263 |
| 23 | parameters = 264 |
| 24 | typedargslist = 265 |
| 25 | tfpdef = 266 |
| 26 | varargslist = 267 |
| 27 | vfpdef = 268 |
| 28 | stmt = 269 |
| 29 | simple_stmt = 270 |
| 30 | small_stmt = 271 |
| 31 | expr_stmt = 272 |
Yury Selivanov | f8cb8a1 | 2016-09-08 20:50:03 -0700 | [diff] [blame] | 32 | annassign = 273 |
| 33 | testlist_star_expr = 274 |
| 34 | augassign = 275 |
| 35 | del_stmt = 276 |
| 36 | pass_stmt = 277 |
| 37 | flow_stmt = 278 |
| 38 | break_stmt = 279 |
| 39 | continue_stmt = 280 |
| 40 | return_stmt = 281 |
| 41 | yield_stmt = 282 |
| 42 | raise_stmt = 283 |
| 43 | import_stmt = 284 |
| 44 | import_name = 285 |
| 45 | import_from = 286 |
| 46 | import_as_name = 287 |
| 47 | dotted_as_name = 288 |
| 48 | import_as_names = 289 |
| 49 | dotted_as_names = 290 |
| 50 | dotted_name = 291 |
| 51 | global_stmt = 292 |
| 52 | nonlocal_stmt = 293 |
| 53 | assert_stmt = 294 |
| 54 | compound_stmt = 295 |
| 55 | async_stmt = 296 |
| 56 | if_stmt = 297 |
| 57 | while_stmt = 298 |
| 58 | for_stmt = 299 |
| 59 | try_stmt = 300 |
| 60 | with_stmt = 301 |
| 61 | with_item = 302 |
| 62 | except_clause = 303 |
| 63 | suite = 304 |
Emily Morehouse | 8f59ee0 | 2019-01-24 16:49:56 -0700 | [diff] [blame] | 64 | namedexpr_test = 305 |
| 65 | test = 306 |
| 66 | test_nocond = 307 |
| 67 | lambdef = 308 |
| 68 | lambdef_nocond = 309 |
| 69 | or_test = 310 |
| 70 | and_test = 311 |
| 71 | not_test = 312 |
| 72 | comparison = 313 |
| 73 | comp_op = 314 |
| 74 | star_expr = 315 |
| 75 | expr = 316 |
| 76 | xor_expr = 317 |
| 77 | and_expr = 318 |
| 78 | shift_expr = 319 |
| 79 | arith_expr = 320 |
| 80 | term = 321 |
| 81 | factor = 322 |
| 82 | power = 323 |
| 83 | atom_expr = 324 |
| 84 | atom = 325 |
| 85 | testlist_comp = 326 |
| 86 | trailer = 327 |
| 87 | subscriptlist = 328 |
| 88 | subscript = 329 |
| 89 | sliceop = 330 |
| 90 | exprlist = 331 |
| 91 | testlist = 332 |
| 92 | dictorsetmaker = 333 |
| 93 | classdef = 334 |
| 94 | arglist = 335 |
| 95 | argument = 336 |
| 96 | comp_iter = 337 |
| 97 | sync_comp_for = 338 |
| 98 | comp_for = 339 |
| 99 | comp_if = 340 |
| 100 | encoding_decl = 341 |
| 101 | yield_expr = 342 |
| 102 | yield_arg = 343 |
Guido van Rossum | dcfcd14 | 2019-01-31 03:40:27 -0800 | [diff] [blame] | 103 | func_body_suite = 344 |
| 104 | func_type_input = 345 |
| 105 | func_type = 346 |
| 106 | typelist = 347 |
Guido van Rossum | 4747887 | 1996-08-21 14:32:37 +0000 | [diff] [blame] | 107 | #--end constants-- |
Guido van Rossum | b31c7f7 | 1993-11-11 10:31:23 +0000 | [diff] [blame] | 108 | |
Guido van Rossum | b31c7f7 | 1993-11-11 10:31:23 +0000 | [diff] [blame] | 109 | sym_name = {} |
Guido van Rossum | cc2b016 | 2007-02-11 06:12:03 +0000 | [diff] [blame] | 110 | for _name, _value in list(globals().items()): |
Fred Drake | dc1a072 | 1997-10-06 21:06:29 +0000 | [diff] [blame] | 111 | if type(_value) is type(0): |
Guido van Rossum | 45e2fbc | 1998-03-26 21:13:24 +0000 | [diff] [blame] | 112 | sym_name[_value] = _name |
Serhiy Storchaka | 8ac6581 | 2018-12-22 11:18:40 +0200 | [diff] [blame] | 113 | del _name, _value |