blob: 44996936e2d28f85535ebd61b57e15d515ea6d18 [file] [log] [blame]
Georg Brandl116aa622007-08-15 14:28:22 +00001:mod:`symbol` --- Constants used with Python parse trees
2========================================================
3
4.. module:: symbol
5 :synopsis: Constants representing internal nodes of the parse tree.
Terry Jan Reedyfa089b92016-06-11 15:02:54 -04006
Georg Brandl116aa622007-08-15 14:28:22 +00007.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
8
Raymond Hettingera1993682011-01-27 01:20:32 +00009**Source code:** :source:`Lib/symbol.py`
10
11--------------
Georg Brandl116aa622007-08-15 14:28:22 +000012
13This module provides constants which represent the numeric values of internal
14nodes of the parse tree. Unlike most Python constants, these use lower-case
15names. Refer to the file :file:`Grammar/Grammar` in the Python distribution for
16the definitions of the names in the context of the language grammar. The
17specific numeric values which the names map to may change between Python
18versions.
19
20This module also provides one additional data object:
21
22
23.. data:: sym_name
24
25 Dictionary mapping the numeric values of the constants defined in this module
26 back to name strings, allowing more human-readable representation of parse trees
27 to be generated.