File: symbol_v1_3.py

package info (click to toggle)
python-gendoc 0.73-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 312 kB
  • ctags: 844
  • sloc: python: 2,609; makefile: 123; sh: 26
file content (64 lines) | stat: -rw-r--r-- 1,050 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Non-terminal symbols of Python grammar (from "graminit.h")

single_input = 256
file_input = 257
eval_input = 258
funcdef = 259
parameters = 260
varargslist = 261
fpdef = 262
fplist = 263
stmt = 264
simple_stmt = 265
small_stmt = 266
expr_stmt = 267
print_stmt = 268
del_stmt = 269
pass_stmt = 270
flow_stmt = 271
break_stmt = 272
continue_stmt = 273
return_stmt = 274
raise_stmt = 275
import_stmt = 276
dotted_name = 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
lambdef = 302
trailer = 303
subscript = 304
exprlist = 305
testlist = 306
dictmaker = 307
classdef = 308
arglist = 309
argument = 310

names = dir()
sym_name = {}
for name in names:
    number = eval(name)
    if type(number) is type(0):
	sym_name[number] = name