blob: 54cabeb7bc9a6fd1500d6e46a576a7ecc0705bcb [file] [log] [blame]
Fred Drake295da241998-08-10 19:42:37 +00001\section{\module{symbol} ---
Fred Drakebbac4321999-02-20 00:14:17 +00002 Constants used with Python parse trees}
Fred Drakeb91e9341998-07-23 17:59:49 +00003
Fred Drakebbac4321999-02-20 00:14:17 +00004\declaremodule{standard}{symbol}
Fred Drakeb91e9341998-07-23 17:59:49 +00005\modulesynopsis{Constants representing internal nodes of the parse tree.}
Fred Drakebbac4321999-02-20 00:14:17 +00006\sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org}
Fred Drakeb91e9341998-07-23 17:59:49 +00007
Fred Drakeb0df5671998-02-18 15:59:13 +00008
9This module provides constants which represent the numeric values of
10internal nodes of the parse tree. Unlike most Python constants, these
11use lower-case names. Refer to the file \file{Grammar/Grammar} in the
Thomas Woutersf8316632000-07-16 19:01:10 +000012Python distribution for the definitions of the names in the context of
Fred Drakeb0df5671998-02-18 15:59:13 +000013the language grammar. The specific numeric values which the names map
14to may change between Python versions.
15
16This module also provides one additional data object:
17
Fred Drakeb0df5671998-02-18 15:59:13 +000018
Fred Drakeb0df5671998-02-18 15:59:13 +000019\begin{datadesc}{sym_name}
Fred Drakeba0a9892000-10-18 17:43:06 +000020 Dictionary mapping the numeric values of the constants defined in
21 this module back to name strings, allowing more human-readable
22 representation of parse trees to be generated.
Fred Drakeb0df5671998-02-18 15:59:13 +000023\end{datadesc}
24
Fred Drakeba0a9892000-10-18 17:43:06 +000025
Fred Drakeb0df5671998-02-18 15:59:13 +000026\begin{seealso}
Fred Drakeba0a9892000-10-18 17:43:06 +000027 \seemodule{parser}{The second example for the \refmodule{parser}
28 module shows how to use the \module{symbol}
29 module.}
Fred Drakeb0df5671998-02-18 15:59:13 +000030\end{seealso}