diff options
author | Guido van Rossum <guido@python.org> | 1996-08-21 14:32:37 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-08-21 14:32:37 (GMT) |
commit | 4747887880a3f71ffe306dbba6e92bf0f0d7c0a8 (patch) | |
tree | ea851e77722b0c6b0cfc291e14d209e1c8318e3c /Lib/symbol.py | |
parent | 3a1fbb4c7006b2e77687564e20cbf0b48e239e8c (diff) | |
download | cpython-4747887880a3f71ffe306dbba6e92bf0f0d7c0a8.zip cpython-4747887880a3f71ffe306dbba6e92bf0f0d7c0a8.tar.gz cpython-4747887880a3f71ffe306dbba6e92bf0f0d7c0a8.tar.bz2 |
New batch from Fred
Diffstat (limited to 'Lib/symbol.py')
-rwxr-xr-x | Lib/symbol.py | 84 |
1 files changed, 56 insertions, 28 deletions
diff --git a/Lib/symbol.py b/Lib/symbol.py index 36f178a..6d925ea 100755 --- a/Lib/symbol.py +++ b/Lib/symbol.py @@ -1,5 +1,18 @@ -# Non-terminal symbols of Python grammar (from "graminit.h") +#! /usr/bin/env python +# +# Non-terminal symbols of Python grammar (from "graminit.h") +# +# This file is automatically generated; please don't muck it up! +# +# To update the symbols in this file, 'cd' to the top directory of +# the python source tree after building the interpreter and run: +# +# PYTHONPATH=Lib:Modules ./python Lib/symbol.py +# +# (this path allows the import of string.py, token.py, and regexmodule.so +# for a site with no installation in place) +#--start constants-- single_input = 256 file_input = 257 eval_input = 258 @@ -23,39 +36,40 @@ 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 -power = 301 -atom = 302 -lambdef = 303 -trailer = 304 -subscript = 305 +exec_stmt = 279 +compound_stmt = 280 +if_stmt = 281 +while_stmt = 282 +for_stmt = 283 +try_stmt = 284 +except_clause = 285 +suite = 286 +test = 287 +and_test = 288 +not_test = 289 +comparison = 290 +comp_op = 291 +expr = 292 +xor_expr = 293 +and_expr = 294 +shift_expr = 295 +arith_expr = 296 +term = 297 +factor = 298 +power = 299 +atom = 300 +lambdef = 301 +trailer = 302 +subscriptlist = 303 +subscript = 304 +sliceop = 305 exprlist = 306 testlist = 307 dictmaker = 308 classdef = 309 arglist = 310 argument = 311 +#--end constants-- names = dir() sym_name = {} @@ -63,3 +77,17 @@ for name in names: number = eval(name) if type(number) is type(0): sym_name[number] = name + + +def main(): + import sys + import token + if len(sys.argv) == 1: + sys.argv = sys.argv + ["Include/graminit.h", "Lib/symbol.py"] + token.main() + +if __name__ == "__main__": + main() + +# +# end of file |