summaryrefslogtreecommitdiff
path: root/sys/src/cmd/python/Doc/lib/libtoken.tex
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@localhost>2011-05-03 11:25:13 +0000
committercinap_lenrek <cinap_lenrek@localhost>2011-05-03 11:25:13 +0000
commit458120dd40db6b4df55a4e96b650e16798ef06a0 (patch)
tree8f82685be24fef97e715c6f5ca4c68d34d5074ee /sys/src/cmd/python/Doc/lib/libtoken.tex
parent3a742c699f6806c1145aea5149bf15de15a0afd7 (diff)
add hg and python
Diffstat (limited to 'sys/src/cmd/python/Doc/lib/libtoken.tex')
-rw-r--r--sys/src/cmd/python/Doc/lib/libtoken.tex44
1 files changed, 44 insertions, 0 deletions
diff --git a/sys/src/cmd/python/Doc/lib/libtoken.tex b/sys/src/cmd/python/Doc/lib/libtoken.tex
new file mode 100644
index 000000000..47f4750db
--- /dev/null
+++ b/sys/src/cmd/python/Doc/lib/libtoken.tex
@@ -0,0 +1,44 @@
+\section{\module{token} ---
+ Constants used with Python parse trees}
+
+\declaremodule{standard}{token}
+\modulesynopsis{Constants representing terminal nodes of the parse tree.}
+\sectionauthor{Fred L. Drake, Jr.}{fdrake@acm.org}
+
+
+This module provides constants which represent the numeric values of
+leaf nodes of the parse tree (terminal tokens). Refer to the file
+\file{Grammar/Grammar} in the Python distribution for the definitions
+of the names in the context of the language grammar. The specific
+numeric values which the names map to may change between Python
+versions.
+
+This module also provides one data object and some functions. The
+functions mirror definitions in the Python C header files.
+
+
+
+\begin{datadesc}{tok_name}
+Dictionary mapping the numeric values of the constants defined in this
+module back to name strings, allowing more human-readable
+representation of parse trees to be generated.
+\end{datadesc}
+
+\begin{funcdesc}{ISTERMINAL}{x}
+Return true for terminal token values.
+\end{funcdesc}
+
+\begin{funcdesc}{ISNONTERMINAL}{x}
+Return true for non-terminal token values.
+\end{funcdesc}
+
+\begin{funcdesc}{ISEOF}{x}
+Return true if \var{x} is the marker indicating the end of input.
+\end{funcdesc}
+
+
+\begin{seealso}
+ \seemodule{parser}{The second example for the \refmodule{parser}
+ module shows how to use the \module{symbol}
+ module.}
+\end{seealso}