OLD | NEW |
1 #! /usr/bin/env python | 1 #! /usr/bin/env python |
2 | 2 |
3 """Non-terminal symbols of Python grammar (from "graminit.h").""" | 3 """Non-terminal symbols of Python grammar (from "graminit.h").""" |
4 | 4 |
5 # This file is automatically generated; please don't muck it up! | 5 # This file is automatically generated; please don't muck it up! |
6 # | 6 # |
7 # To update the symbols in this file, 'cd' to the top directory of | 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: | 8 # the python source tree after building the interpreter and run: |
9 # | 9 # |
10 # python Lib/symbol.py | 10 # python Lib/symbol.py |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 argument = 331 | 88 argument = 331 |
89 list_iter = 332 | 89 list_iter = 332 |
90 list_for = 333 | 90 list_for = 333 |
91 list_if = 334 | 91 list_if = 334 |
92 gen_iter = 335 | 92 gen_iter = 335 |
93 gen_for = 336 | 93 gen_for = 336 |
94 gen_if = 337 | 94 gen_if = 337 |
95 testlist1 = 338 | 95 testlist1 = 338 |
96 encoding_decl = 339 | 96 encoding_decl = 339 |
97 yield_expr = 340 | 97 yield_expr = 340 |
| 98 yield_arg = 341 |
98 #--end constants-- | 99 #--end constants-- |
99 | 100 |
100 sym_name = {} | 101 sym_name = {} |
101 for _name, _value in globals().items(): | 102 for _name, _value in globals().items(): |
102 if type(_value) is type(0): | 103 if type(_value) is type(0): |
103 sym_name[_value] = _name | 104 sym_name[_value] = _name |
104 | 105 |
105 | 106 |
106 def main(): | 107 def main(): |
107 import sys | 108 import sys |
108 import token | 109 import token |
109 if len(sys.argv) == 1: | 110 if len(sys.argv) == 1: |
110 sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"] | 111 sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"] |
111 token.main() | 112 token.main() |
112 | 113 |
113 if __name__ == "__main__": | 114 if __name__ == "__main__": |
114 main() | 115 main() |
OLD | NEW |