blob: 5134d47269703578d4f9aa5ba6c6c80235eb3ddd [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.
6.. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org>
7
8
9This module provides constants which represent the numeric values of internal
10nodes of the parse tree. Unlike most Python constants, these use lower-case
11names. Refer to the file :file:`Grammar/Grammar` in the Python distribution for
12the definitions of the names in the context of the language grammar. The
13specific numeric values which the names map to may change between Python
14versions.
15
16This module also provides one additional data object:
17
18
19.. data:: sym_name
20
21 Dictionary mapping the numeric values of the constants defined in this module
22 back to name strings, allowing more human-readable representation of parse trees
23 to be generated.
24
25
26.. seealso::
27
28 Module :mod:`parser`
29 The second example for the :mod:`parser` module shows how to use the
30 :mod:`symbol` module.
31