/Doc/library/symbol.rst

http://unladen-swallow.googlecode.com/ · ReStructuredText · 32 lines · 20 code · 12 blank · 0 comment · 0 complexity · 11d13975fe4eaa78514fa259d1ce3452 MD5 · raw file

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