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