1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
<html xmlns="http://www.w3.org/1999/xhtml">
7
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
9
<title>32.4. symbol — Constants used with Python parse trees — Python 2.7.11 documentation</title>
11
<link rel="stylesheet" href="../_static/classic.css" type="text/css" />
12
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
14
<script type="text/javascript">
15
var DOCUMENTATION_OPTIONS = {
18
COLLAPSE_INDEX: false,
23
<script type="text/javascript" src="../_static/jquery.js"></script>
24
<script type="text/javascript" src="../_static/underscore.js"></script>
25
<script type="text/javascript" src="../_static/doctools.js"></script>
26
<script type="text/javascript" src="../_static/sidebar.js"></script>
27
<link rel="search" type="application/opensearchdescription+xml"
28
title="Search within Python 2.7.11 documentation"
29
href="../_static/opensearch.xml"/>
30
<link rel="author" title="About these documents" href="../about.html" />
31
<link rel="copyright" title="Copyright" href="../copyright.html" />
32
<link rel="top" title="Python 2.7.11 documentation" href="../contents.html" />
33
<link rel="up" title="32. Python Language Services" href="language.html" />
34
<link rel="next" title="32.5. token — Constants used with Python parse trees" href="token.html" />
35
<link rel="prev" title="32.3. symtable — Access to the compiler’s symbol tables" href="symtable.html" />
36
<link rel="shortcut icon" type="image/png" href="../_static/py.png" />
37
<script type="text/javascript" src="../_static/copybutton.js"></script>
38
<script type="text/javascript" src="../_static/version_switch.js"></script>
43
<body role="document">
44
<div class="related" role="navigation" aria-label="related navigation">
47
<li class="right" style="margin-right: 10px">
48
<a href="../genindex.html" title="General Index"
49
accesskey="I">index</a></li>
51
<a href="../py-modindex.html" title="Python Module Index"
54
<a href="token.html" title="32.5. token — Constants used with Python parse trees"
55
accesskey="N">next</a> |</li>
57
<a href="symtable.html" title="32.3. symtable — Access to the compiler’s symbol tables"
58
accesskey="P">previous</a> |</li>
59
<li><img src="../_static/py.png" alt=""
60
style="vertical-align: middle; margin-top: -1px"/></li>
61
<li><a href="https://www.python.org/">Python</a> »</li>
63
<span class="version_switcher_placeholder">2.7.11</span>
64
<a href="../index.html">Documentation</a> »
67
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>
68
<li class="nav-item nav-item-2"><a href="language.html" accesskey="U">32. Python Language Services</a> »</li>
72
<div class="document">
73
<div class="documentwrapper">
74
<div class="bodywrapper">
75
<div class="body" role="main">
77
<div class="section" id="module-symbol">
78
<span id="symbol-constants-used-with-python-parse-trees"></span><h1>32.4. <a class="reference internal" href="#module-symbol" title="symbol: Constants representing internal nodes of the parse tree."><code class="xref py py-mod docutils literal"><span class="pre">symbol</span></code></a> — Constants used with Python parse trees<a class="headerlink" href="#module-symbol" title="Permalink to this headline">¶</a></h1>
79
<p><strong>Source code:</strong> <a class="reference external" href="https://hg.python.org/cpython/file/2.7/Lib/symbol.py">Lib/symbol.py</a></p>
80
<hr class="docutils" />
81
<p>This module provides constants which represent the numeric values of internal
82
nodes of the parse tree. Unlike most Python constants, these use lower-case
83
names. Refer to the file <code class="file docutils literal"><span class="pre">Grammar/Grammar</span></code> in the Python distribution for
84
the definitions of the names in the context of the language grammar. The
85
specific numeric values which the names map to may change between Python
87
<p>This module also provides one additional data object:</p>
89
<dt id="symbol.sym_name">
90
<code class="descclassname">symbol.</code><code class="descname">sym_name</code><a class="headerlink" href="#symbol.sym_name" title="Permalink to this definition">¶</a></dt>
91
<dd><p>Dictionary mapping the numeric values of the constants defined in this module
92
back to name strings, allowing more human-readable representation of parse trees
102
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
103
<div class="sphinxsidebarwrapper">
104
<h4>Previous topic</h4>
105
<p class="topless"><a href="symtable.html"
106
title="previous chapter">32.3. <code class="docutils literal"><span class="pre">symtable</span></code> — Access to the compiler’s symbol tables</a></p>
108
<p class="topless"><a href="token.html"
109
title="next chapter">32.5. <code class="docutils literal"><span class="pre">token</span></code> — Constants used with Python parse trees</a></p>
111
<ul class="this-page-menu">
112
<li><a href="../bugs.html">Report a Bug</a></li>
113
<li><a href="../_sources/library/symbol.txt"
114
rel="nofollow">Show Source</a></li>
117
<div id="searchbox" style="display: none" role="search">
118
<h3>Quick search</h3>
119
<form class="search" action="../search.html" method="get">
120
<input type="text" name="q" />
121
<input type="submit" value="Go" />
122
<input type="hidden" name="check_keywords" value="yes" />
123
<input type="hidden" name="area" value="default" />
125
<p class="searchtip" style="font-size: 90%">
126
Enter search terms or a module, class or function name.
129
<script type="text/javascript">$('#searchbox').show(0);</script>
132
<div class="clearer"></div>
134
<div class="related" role="navigation" aria-label="related navigation">
137
<li class="right" style="margin-right: 10px">
138
<a href="../genindex.html" title="General Index"
141
<a href="../py-modindex.html" title="Python Module Index"
144
<a href="token.html" title="32.5. token — Constants used with Python parse trees"
147
<a href="symtable.html" title="32.3. symtable — Access to the compiler’s symbol tables"
149
<li><img src="../_static/py.png" alt=""
150
style="vertical-align: middle; margin-top: -1px"/></li>
151
<li><a href="https://www.python.org/">Python</a> »</li>
153
<span class="version_switcher_placeholder">2.7.11</span>
154
<a href="../index.html">Documentation</a> »
157
<li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li>
158
<li class="nav-item nav-item-2"><a href="language.html" >32. Python Language Services</a> »</li>
162
© <a href="../copyright.html">Copyright</a> 1990-2016, Python Software Foundation.
164
The Python Software Foundation is a non-profit corporation.
165
<a href="https://www.python.org/psf/donations/">Please donate.</a>
167
Last updated on Jan 23, 2016.
168
<a href="../bugs.html">Found a bug</a>?
170
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.3.3.
b'\\ No newline at end of file'