aboutsummaryrefslogtreecommitdiffstats
path: root/lib/jython/Lib/symbol.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/jython/Lib/symbol.py')
-rw-r--r--lib/jython/Lib/symbol.py93
1 files changed, 93 insertions, 0 deletions
diff --git a/lib/jython/Lib/symbol.py b/lib/jython/Lib/symbol.py
new file mode 100644
index 000000000..c73bbd12a
--- /dev/null
+++ b/lib/jython/Lib/symbol.py
@@ -0,0 +1,93 @@
+#! /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:
+#
+# python Lib/symbol.py
+
+#--start constants--
+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
+augassign = 268
+print_stmt = 269
+del_stmt = 270
+pass_stmt = 271
+flow_stmt = 272
+break_stmt = 273
+continue_stmt = 274
+return_stmt = 275
+raise_stmt = 276
+import_stmt = 277
+import_as_name = 278
+dotted_as_name = 279
+dotted_name = 280
+global_stmt = 281
+exec_stmt = 282
+assert_stmt = 283
+compound_stmt = 284
+if_stmt = 285
+while_stmt = 286
+for_stmt = 287
+try_stmt = 288
+except_clause = 289
+suite = 290
+test = 291
+and_test = 292
+not_test = 293
+comparison = 294
+comp_op = 295
+expr = 296
+xor_expr = 297
+and_expr = 298
+shift_expr = 299
+arith_expr = 300
+term = 301
+factor = 302
+power = 303
+atom = 304
+listmaker = 305
+lambdef = 306
+trailer = 307
+subscriptlist = 308
+subscript = 309
+sliceop = 310
+exprlist = 311
+testlist = 312
+dictmaker = 313
+classdef = 314
+arglist = 315
+argument = 316
+list_iter = 317
+list_for = 318
+list_if = 319
+#--end constants--
+
+sym_name = {}
+for _name, _value in globals().items():
+ if type(_value) is type(0):
+ sym_name[_value] = _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()