Mercurial > cpython-lru_cache-weakref
annotate Lib/symbol.py @ 4566:6403c94de50d legacy-trunk
Added safeguard against failure in __del__.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Wed, 27 Nov 1996 19:39:58 +0000 |
| parents | 7f83e24d1d86 |
| children | a3233864ca38 |
| rev | line source |
|---|---|
| 4084 | 1 #! /usr/bin/env python |
| 2 # | |
| 3 # Non-terminal symbols of Python grammar (from "graminit.h") | |
| 4 # | |
| 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 # | |
| 10 # PYTHONPATH=Lib:Modules ./python Lib/symbol.py | |
| 11 # | |
| 12 # (this path allows the import of string.py, token.py, and regexmodule.so | |
| 13 # for a site with no installation in place) | |
|
1407
b9fcfb99a3e5
* test_select.py: (some) tests for built-in select module
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
14 |
| 4084 | 15 #--start constants-- |
|
1407
b9fcfb99a3e5
* test_select.py: (some) tests for built-in select module
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
16 single_input = 256 |
|
b9fcfb99a3e5
* test_select.py: (some) tests for built-in select module
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
17 file_input = 257 |
|
b9fcfb99a3e5
* test_select.py: (some) tests for built-in select module
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
18 eval_input = 258 |
|
1746
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
19 funcdef = 259 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
20 parameters = 260 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
21 varargslist = 261 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
22 fpdef = 262 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
23 fplist = 263 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
24 stmt = 264 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
25 simple_stmt = 265 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
26 small_stmt = 266 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
27 expr_stmt = 267 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
28 print_stmt = 268 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
29 del_stmt = 269 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
30 pass_stmt = 270 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
31 flow_stmt = 271 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
32 break_stmt = 272 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
33 continue_stmt = 273 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
34 return_stmt = 274 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
35 raise_stmt = 275 |
|
1940892d2fe3
Merge alpha100 branch back to main trunk
Guido van Rossum <guido@python.org>
parents:
1407
diff
changeset
|
36 import_stmt = 276 |
|
3754
d23fea248a1e
Changes for new parser module (Fred Drake)
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
37 dotted_name = 277 |
|
d23fea248a1e
Changes for new parser module (Fred Drake)
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
38 global_stmt = 278 |
| 4084 | 39 exec_stmt = 279 |
| 40 compound_stmt = 280 | |
| 41 if_stmt = 281 | |
| 42 while_stmt = 282 | |
| 43 for_stmt = 283 | |
| 44 try_stmt = 284 | |
| 45 except_clause = 285 | |
| 46 suite = 286 | |
| 47 test = 287 | |
| 48 and_test = 288 | |
| 49 not_test = 289 | |
| 50 comparison = 290 | |
| 51 comp_op = 291 | |
| 52 expr = 292 | |
| 53 xor_expr = 293 | |
| 54 and_expr = 294 | |
| 55 shift_expr = 295 | |
| 56 arith_expr = 296 | |
| 57 term = 297 | |
| 58 factor = 298 | |
| 59 power = 299 | |
| 60 atom = 300 | |
| 61 lambdef = 301 | |
| 62 trailer = 302 | |
| 63 subscriptlist = 303 | |
| 64 subscript = 304 | |
| 65 sliceop = 305 | |
|
3754
d23fea248a1e
Changes for new parser module (Fred Drake)
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
66 exprlist = 306 |
|
d23fea248a1e
Changes for new parser module (Fred Drake)
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
67 testlist = 307 |
|
d23fea248a1e
Changes for new parser module (Fred Drake)
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
68 dictmaker = 308 |
|
d23fea248a1e
Changes for new parser module (Fred Drake)
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
69 classdef = 309 |
|
d23fea248a1e
Changes for new parser module (Fred Drake)
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
70 arglist = 310 |
|
d23fea248a1e
Changes for new parser module (Fred Drake)
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
71 argument = 311 |
| 4084 | 72 #--end constants-- |
|
1407
b9fcfb99a3e5
* test_select.py: (some) tests for built-in select module
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
73 |
|
b9fcfb99a3e5
* test_select.py: (some) tests for built-in select module
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
74 names = dir() |
|
b9fcfb99a3e5
* test_select.py: (some) tests for built-in select module
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
75 sym_name = {} |
|
b9fcfb99a3e5
* test_select.py: (some) tests for built-in select module
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
76 for name in names: |
|
3754
d23fea248a1e
Changes for new parser module (Fred Drake)
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
77 number = eval(name) |
|
d23fea248a1e
Changes for new parser module (Fred Drake)
Guido van Rossum <guido@python.org>
parents:
1746
diff
changeset
|
78 if type(number) is type(0): |
|
1407
b9fcfb99a3e5
* test_select.py: (some) tests for built-in select module
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
79 sym_name[number] = name |
| 4084 | 80 |
| 81 | |
| 82 def main(): | |
| 83 import sys | |
| 84 import token | |
| 85 if len(sys.argv) == 1: | |
| 86 sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"] | |
| 87 token.main() | |
| 88 | |
| 89 if __name__ == "__main__": | |
| 90 main() | |
| 91 | |
| 92 # | |
| 93 # end of file |
