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 |
| 18 | funcdef = 261 |
| 19 | parameters = 262 |
| 20 | varargslist = 263 |
| 21 | fpdef = 264 |
| 22 | fplist = 265 |
| 23 | stmt = 266 |
| 24 | simple_stmt = 267 |
| 25 | small_stmt = 268 |
| 26 | expr_stmt = 269 |
| 27 | augassign = 270 |
| 28 | print_stmt = 271 |
| 29 | del_stmt = 272 |
| 30 | pass_stmt = 273 |
| 31 | flow_stmt = 274 |
| 32 | break_stmt = 275 |
| 33 | continue_stmt = 276 |
| 34 | return_stmt = 277 |
| 35 | yield_stmt = 278 |
| 36 | raise_stmt = 279 |
| 37 | import_stmt = 280 |
Anthony Baxter | 1a4ddae | 2004-08-31 10:07:13 +0000 | [diff] [blame] | 38 | import_name = 281 |
| 39 | import_from = 282 |
| 40 | import_as_name = 283 |
| 41 | dotted_as_name = 284 |
| 42 | import_as_names = 285 |
| 43 | dotted_as_names = 286 |
| 44 | dotted_name = 287 |
| 45 | global_stmt = 288 |
| 46 | exec_stmt = 289 |
| 47 | assert_stmt = 290 |
| 48 | compound_stmt = 291 |
| 49 | if_stmt = 292 |
| 50 | while_stmt = 293 |
| 51 | for_stmt = 294 |
| 52 | try_stmt = 295 |
| 53 | except_clause = 296 |
| 54 | suite = 297 |
| 55 | test = 298 |
| 56 | and_test = 299 |
| 57 | not_test = 300 |
| 58 | comparison = 301 |
| 59 | comp_op = 302 |
| 60 | expr = 303 |
| 61 | xor_expr = 304 |
| 62 | and_expr = 305 |
| 63 | shift_expr = 306 |
| 64 | arith_expr = 307 |
| 65 | term = 308 |
| 66 | factor = 309 |
| 67 | power = 310 |
| 68 | atom = 311 |
| 69 | listmaker = 312 |
| 70 | testlist_gexp = 313 |
| 71 | lambdef = 314 |
| 72 | trailer = 315 |
| 73 | subscriptlist = 316 |
| 74 | subscript = 317 |
| 75 | sliceop = 318 |
| 76 | exprlist = 319 |
| 77 | testlist = 320 |
| 78 | testlist_safe = 321 |
| 79 | dictmaker = 322 |
| 80 | classdef = 323 |
| 81 | arglist = 324 |
| 82 | argument = 325 |
| 83 | list_iter = 326 |
| 84 | list_for = 327 |
| 85 | list_if = 328 |
| 86 | gen_iter = 329 |
| 87 | gen_for = 330 |
| 88 | gen_if = 331 |
| 89 | testlist1 = 332 |
| 90 | encoding_decl = 333 |
Guido van Rossum | 4747887 | 1996-08-21 14:32:37 +0000 | [diff] [blame] | 91 | #--end constants-- |
Guido van Rossum | b31c7f7 | 1993-11-11 10:31:23 +0000 | [diff] [blame] | 92 | |
Guido van Rossum | b31c7f7 | 1993-11-11 10:31:23 +0000 | [diff] [blame] | 93 | sym_name = {} |
Fred Drake | dc1a072 | 1997-10-06 21:06:29 +0000 | [diff] [blame] | 94 | for _name, _value in globals().items(): |
| 95 | if type(_value) is type(0): |
Guido van Rossum | 45e2fbc | 1998-03-26 21:13:24 +0000 | [diff] [blame] | 96 | sym_name[_value] = _name |
Guido van Rossum | 4747887 | 1996-08-21 14:32:37 +0000 | [diff] [blame] | 97 | |
| 98 | |
| 99 | def main(): |
| 100 | import sys |
| 101 | import token |
| 102 | if len(sys.argv) == 1: |
Guido van Rossum | 45e2fbc | 1998-03-26 21:13:24 +0000 | [diff] [blame] | 103 | sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"] |
Guido van Rossum | 4747887 | 1996-08-21 14:32:37 +0000 | [diff] [blame] | 104 | token.main() |
| 105 | |
| 106 | if __name__ == "__main__": |
| 107 | main() |