Fred Drake | 295da24 | 1998-08-10 19:42:37 +0000 | [diff] [blame] | 1 | \section{\module{symbol} --- |
Fred Drake | bbac432 | 1999-02-20 00:14:17 +0000 | [diff] [blame] | 2 | Constants used with Python parse trees} |
Fred Drake | b91e934 | 1998-07-23 17:59:49 +0000 | [diff] [blame] | 3 | |
Fred Drake | bbac432 | 1999-02-20 00:14:17 +0000 | [diff] [blame] | 4 | \declaremodule{standard}{symbol} |
Fred Drake | b91e934 | 1998-07-23 17:59:49 +0000 | [diff] [blame] | 5 | \modulesynopsis{Constants representing internal nodes of the parse tree.} |
Fred Drake | bbac432 | 1999-02-20 00:14:17 +0000 | [diff] [blame] | 6 | \sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org} |
Fred Drake | b91e934 | 1998-07-23 17:59:49 +0000 | [diff] [blame] | 7 | |
Fred Drake | b0df567 | 1998-02-18 15:59:13 +0000 | [diff] [blame] | 8 | |
| 9 | This module provides constants which represent the numeric values of |
| 10 | internal nodes of the parse tree. Unlike most Python constants, these |
| 11 | use lower-case names. Refer to the file \file{Grammar/Grammar} in the |
Thomas Wouters | f831663 | 2000-07-16 19:01:10 +0000 | [diff] [blame] | 12 | Python distribution for the definitions of the names in the context of |
Fred Drake | b0df567 | 1998-02-18 15:59:13 +0000 | [diff] [blame] | 13 | the language grammar. The specific numeric values which the names map |
| 14 | to may change between Python versions. |
| 15 | |
| 16 | This module also provides one additional data object: |
| 17 | |
Fred Drake | b0df567 | 1998-02-18 15:59:13 +0000 | [diff] [blame] | 18 | |
Fred Drake | b0df567 | 1998-02-18 15:59:13 +0000 | [diff] [blame] | 19 | \begin{datadesc}{sym_name} |
Fred Drake | ba0a989 | 2000-10-18 17:43:06 +0000 | [diff] [blame] | 20 | 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 Drake | b0df567 | 1998-02-18 15:59:13 +0000 | [diff] [blame] | 23 | \end{datadesc} |
| 24 | |
Fred Drake | ba0a989 | 2000-10-18 17:43:06 +0000 | [diff] [blame] | 25 | |
Fred Drake | b0df567 | 1998-02-18 15:59:13 +0000 | [diff] [blame] | 26 | \begin{seealso} |
Fred Drake | ba0a989 | 2000-10-18 17:43:06 +0000 | [diff] [blame] | 27 | \seemodule{parser}{The second example for the \refmodule{parser} |
| 28 | module shows how to use the \module{symbol} |
| 29 | module.} |
Fred Drake | b0df567 | 1998-02-18 15:59:13 +0000 | [diff] [blame] | 30 | \end{seealso} |