| 1 |
|
| 2 |
|
| 3 |
"""Non-terminal symbols of Python grammar (from "graminit.h").""" |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
single_input = 256 |
| 14 |
file_input = 257 |
| 15 |
eval_input = 258 |
| 16 |
decorator = 259 |
| 17 |
decorators = 260 |
| 18 |
decorated = 261 |
| 19 |
funcdef = 262 |
| 20 |
parameters = 263 |
| 21 |
varargslist = 264 |
| 22 |
fpdef = 265 |
| 23 |
fplist = 266 |
| 24 |
stmt = 267 |
| 25 |
simple_stmt = 268 |
| 26 |
small_stmt = 269 |
| 27 |
expr_stmt = 270 |
| 28 |
augassign = 271 |
| 29 |
print_stmt = 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 |
exec_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_item = 298 |
| 56 |
except_clause = 299 |
| 57 |
suite = 300 |
| 58 |
testlist_safe = 301 |
| 59 |
old_test = 302 |
| 60 |
old_lambdef = 303 |
| 61 |
test = 304 |
| 62 |
or_test = 305 |
| 63 |
and_test = 306 |
| 64 |
not_test = 307 |
| 65 |
comparison = 308 |
| 66 |
comp_op = 309 |
| 67 |
expr = 310 |
| 68 |
xor_expr = 311 |
| 69 |
and_expr = 312 |
| 70 |
shift_expr = 313 |
| 71 |
arith_expr = 314 |
| 72 |
term = 315 |
| 73 |
factor = 316 |
| 74 |
power = 317 |
| 75 |
atom = 318 |
| 76 |
listmaker = 319 |
| 77 |
testlist_comp = 320 |
| 78 |
lambdef = 321 |
| 79 |
trailer = 322 |
| 80 |
subscriptlist = 323 |
| 81 |
subscript = 324 |
| 82 |
sliceop = 325 |
| 83 |
exprlist = 326 |
| 84 |
testlist = 327 |
| 85 |
dictorsetmaker = 328 |
| 86 |
classdef = 329 |
| 87 |
arglist = 330 |
| 88 |
argument = 331 |
| 89 |
list_iter = 332 |
| 90 |
list_for = 333 |
| 91 |
list_if = 334 |
| 92 |
comp_iter = 335 |
| 93 |
comp_for = 336 |
| 94 |
comp_if = 337 |
| 95 |
testlist1 = 338 |
| 96 |
encoding_decl = 339 |
| 97 |
yield_expr = 340 |
| 98 |
|
| 99 |
|
| 100 |
sym_name = {} |
| 101 |
for _name, _value in globals().items(): |
| 102 |
if type(_value) is type(0): |
| 103 |
sym_name[_value] = _name |
| 104 |
|
| 105 |
|
| 106 |
def main(): |
| 107 |
import sys |
| 108 |
import token |
| 109 |
if len(sys.argv) == 1: |
| 110 |
sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"] |
| 111 |
token.main() |
| 112 |
|
| 113 |
if __name__ == "__main__": |
| 114 |
main() |