summaryrefslogtreecommitdiff
path: root/Lib/symbol.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-08-21 14:32:37 +0000
committerGuido van Rossum <guido@python.org>1996-08-21 14:32:37 +0000
commit4747887880a3f71ffe306dbba6e92bf0f0d7c0a8 (patch)
treeea851e77722b0c6b0cfc291e14d209e1c8318e3c /Lib/symbol.py
parent3a1fbb4c7006b2e77687564e20cbf0b48e239e8c (diff)
downloadcpython-git-4747887880a3f71ffe306dbba6e92bf0f0d7c0a8.tar.gz
New batch from Fred
Diffstat (limited to 'Lib/symbol.py')
-rwxr-xr-xLib/symbol.py84
1 files changed, 56 insertions, 28 deletions
diff --git a/Lib/symbol.py b/Lib/symbol.py
index 36f178a7ee..6d925ea048 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