Guido van Rossum | 4747887 | 1996-08-21 14:32:37 +0000 | [diff] [blame] | 1 | #! /usr/bin/env python |
Guido van Rossum | e7b146f | 2000-02-04 15:28:42 +0000 | [diff] [blame] | 2 | |
| 3 | """Non-terminal symbols of Python grammar (from "graminit.h").""" |
| 4 | |
Guido van Rossum | 4747887 | 1996-08-21 14:32:37 +0000 | [diff] [blame] | 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 | # |
Guido van Rossum | f7a8b45 | 1997-10-22 20:54:50 +0000 | [diff] [blame] | 10 | # python Lib/symbol.py |
Guido van Rossum | b31c7f7 | 1993-11-11 10:31:23 +0000 | [diff] [blame] | 11 | |
Guido van Rossum | 4747887 | 1996-08-21 14:32:37 +0000 | [diff] [blame] | 12 | #--start constants-- |
Guido van Rossum | b31c7f7 | 1993-11-11 10:31:23 +0000 | [diff] [blame] | 13 | single_input = 256 |
| 14 | file_input = 257 |
| 15 | eval_input = 258 |
Anthony Baxter | c2a5a63 | 2004-08-02 06:10:11 +0000 | [diff] [blame] | 16 | decorator = 259 |
| 17 | decorators = 260 |
Georg Brandl | 39cf04b | 2007-08-31 07:58:27 +0000 | [diff] [blame] | 18 | decorated = 261 |
Guido van Rossum | d59da4b | 2007-05-22 18:11:13 +0000 | [diff] [blame] | 19 | funcdef = 262 |
| 20 | parameters = 263 |
| 21 | typedargslist = 264 |
Georg Brandl | 39cf04b | 2007-08-31 07:58:27 +0000 | [diff] [blame] | 22 | tfpdef = 265 |
| 23 | varargslist = 266 |
| 24 | vfpdef = 267 |
| 25 | stmt = 268 |
| 26 | simple_stmt = 269 |
| 27 | small_stmt = 270 |
| 28 | expr_stmt = 271 |
| 29 | augassign = 272 |
| 30 | del_stmt = 273 |
| 31 | pass_stmt = 274 |
| 32 | flow_stmt = 275 |
| 33 | break_stmt = 276 |
| 34 | continue_stmt = 277 |
| 35 | return_stmt = 278 |
| 36 | yield_stmt = 279 |
| 37 | raise_stmt = 280 |
| 38 | import_stmt = 281 |
| 39 | import_name = 282 |
| 40 | import_from = 283 |
| 41 | import_as_name = 284 |
| 42 | dotted_as_name = 285 |
| 43 | import_as_names = 286 |
| 44 | dotted_as_names = 287 |
| 45 | dotted_name = 288 |
| 46 | global_stmt = 289 |
| 47 | nonlocal_stmt = 290 |
| 48 | assert_stmt = 291 |
| 49 | compound_stmt = 292 |
| 50 | if_stmt = 293 |
| 51 | while_stmt = 294 |
| 52 | for_stmt = 295 |
| 53 | try_stmt = 296 |
| 54 | with_stmt = 297 |
| 55 | with_var = 298 |
| 56 | except_clause = 299 |
| 57 | suite = 300 |
| 58 | test = 301 |
| 59 | test_nocond = 302 |
| 60 | lambdef = 303 |
| 61 | lambdef_nocond = 304 |
| 62 | or_test = 305 |
| 63 | and_test = 306 |
| 64 | not_test = 307 |
| 65 | comparison = 308 |
| 66 | comp_op = 309 |
| 67 | star_expr = 310 |
| 68 | expr = 311 |
| 69 | xor_expr = 312 |
| 70 | and_expr = 313 |
| 71 | shift_expr = 314 |
| 72 | arith_expr = 315 |
| 73 | term = 316 |
| 74 | factor = 317 |
| 75 | power = 318 |
| 76 | atom = 319 |
| 77 | testlist_comp = 320 |
| 78 | trailer = 321 |
| 79 | subscriptlist = 322 |
| 80 | subscript = 323 |
| 81 | sliceop = 324 |
| 82 | exprlist = 325 |
| 83 | testlist = 326 |
| 84 | dictorsetmaker = 327 |
| 85 | classdef = 328 |
| 86 | arglist = 329 |
| 87 | argument = 330 |
| 88 | comp_iter = 331 |
| 89 | comp_for = 332 |
| 90 | comp_if = 333 |
| 91 | testlist1 = 334 |
| 92 | encoding_decl = 335 |
| 93 | yield_expr = 336 |
Guido van Rossum | 4747887 | 1996-08-21 14:32:37 +0000 | [diff] [blame] | 94 | #--end constants-- |
Guido van Rossum | b31c7f7 | 1993-11-11 10:31:23 +0000 | [diff] [blame] | 95 | |
Guido van Rossum | b31c7f7 | 1993-11-11 10:31:23 +0000 | [diff] [blame] | 96 | sym_name = {} |
Guido van Rossum | cc2b016 | 2007-02-11 06:12:03 +0000 | [diff] [blame] | 97 | for _name, _value in list(globals().items()): |
Fred Drake | dc1a072 | 1997-10-06 21:06:29 +0000 | [diff] [blame] | 98 | if type(_value) is type(0): |
Guido van Rossum | 45e2fbc | 1998-03-26 21:13:24 +0000 | [diff] [blame] | 99 | sym_name[_value] = _name |
Guido van Rossum | 4747887 | 1996-08-21 14:32:37 +0000 | [diff] [blame] | 100 | |
| 101 | |
| 102 | def main(): |
| 103 | import sys |
| 104 | import token |
| 105 | if len(sys.argv) == 1: |
Guido van Rossum | 45e2fbc | 1998-03-26 21:13:24 +0000 | [diff] [blame] | 106 | sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"] |
Guido van Rossum | 4747887 | 1996-08-21 14:32:37 +0000 | [diff] [blame] | 107 | token.main() |
| 108 | |
| 109 | if __name__ == "__main__": |
| 110 | main() |