cpython/Lib/symbol.py

61 lines
973 B
Python
Raw Normal View History

# Non-terminal symbols of Python grammar (from "graminit.h")
single_input = 256
file_input = 257
eval_input = 258
lambda_input = 259
funcdef = 260
parameters = 261
varargslist = 262
fpdef = 263
fplist = 264
stmt = 265
simple_stmt = 266
small_stmt = 267
expr_stmt = 268
print_stmt = 269
del_stmt = 270
pass_stmt = 271
flow_stmt = 272
break_stmt = 273
continue_stmt = 274
return_stmt = 275
raise_stmt = 276
import_stmt = 277
global_stmt = 278
access_stmt = 279
accesstype = 280
exec_stmt = 281
compound_stmt = 282
if_stmt = 283
while_stmt = 284
for_stmt = 285
try_stmt = 286
except_clause = 287
suite = 288
test = 289
and_test = 290
not_test = 291
comparison = 292
comp_op = 293
expr = 294
xor_expr = 295
and_expr = 296
shift_expr = 297
arith_expr = 298
term = 299
factor = 300
atom = 301
trailer = 302
subscript = 303
exprlist = 304
testlist = 305
dictmaker = 306
classdef = 307
names = dir()
sym_name = {}
for name in names:
number = eval(name)
sym_name[number] = name