summaryrefslogtreecommitdiffstats
path: root/Doc/ref/ref2.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/ref/ref2.tex')
-rw-r--r--Doc/ref/ref2.tex56
1 files changed, 22 insertions, 34 deletions
diff --git a/Doc/ref/ref2.tex b/Doc/ref/ref2.tex
index 3b6adc8..acced61 100644
--- a/Doc/ref/ref2.tex
+++ b/Doc/ref/ref2.tex
@@ -1,4 +1,4 @@
-\chapter{Lexical analysis}
+\chapter{Lexical analysis\label{lexical}}
A Python program is read by a \emph{parser}. Input to the parser is a
stream of \emph{tokens}, generated by the \emph{lexical analyzer}. This
@@ -33,7 +33,7 @@ set.
A Python program is divided into a number of \emph{logical lines}.
\index{line structure}
-\subsection{Logical Lines}
+\subsection{Logical lines}
The end of
a logical line is represented by the token NEWLINE. Statements cannot
@@ -259,17 +259,11 @@ def finally in print
Certain classes of identifiers (besides keywords) have special
meanings. These are:
-\begin{center}
-\begin{tabular}{|l|l|}
-\hline
-Form & Meaning \\
-\hline
-\code{_*} & Not imported by \code{from \var{module} import *} \\
-\code{__*__} & System-defined name \\
-\code{__*} & Class-private name mangling \\
-\hline
-\end{tabular}
-\end{center}
+\begin{tableii}{l|l}{code}{Form}{Meaning}
+\lineii{_*}{Not imported by \samp{from \var{module} import *}}
+\lineii{__*__}{System-defined name}
+\lineii{__*}{Class-private name mangling}
+\end{tableii}
(XXX need section references here.)
@@ -322,27 +316,21 @@ to those used by Standard \C{}. The recognized escape sequences are:
\index{Standard C}
\index{C}
-\begin{center}
-\begin{tabular}{|l|l|}
-\hline
-Escape Sequence & Meaning \\
-\hline
-\code{\e}\emph{newline} & Ignored \\
-\code{\e\e} & Backslash (\code{\e}) \\
-\code{\e'} & Single quote (\code{'}) \\
-\code{\e"} & Double quote (\code{"}) \\
-\code{\e a} & \ASCII{} Bell (BEL) \\
-\code{\e b} & \ASCII{} Backspace (BS) \\
-\code{\e f} & \ASCII{} Formfeed (FF) \\
-\code{\e n} & \ASCII{} Linefeed (LF) \\
-\code{\e r} & \ASCII{} Carriage Return (CR) \\
-\code{\e t} & \ASCII{} Horizontal Tab (TAB) \\
-\code{\e v} & \ASCII{} Vertical Tab (VT) \\
-\code{\e}\emph{ooo} & \ASCII{} character with octal value \emph{ooo} \\
-\code{\e x}\emph{hh...} & \ASCII{} character with hex value \emph{hh...} \\
-\hline
-\end{tabular}
-\end{center}
+\begin{tableii}{l|l}{code}{Escape Sequence}{Meaning}
+\lineii{\e\var{newline}} {Ignored}
+\lineii{\e\e} {Backslash (\code{\e})}
+\lineii{\e'} {Single quote (\code{'})}
+\lineii{\e"} {Double quote (\code{"})}
+\lineii{\e a} {\ASCII{} Bell (BEL)}
+\lineii{\e b} {\ASCII{} Backspace (BS)}
+\lineii{\e f} {\ASCII{} Formfeed (FF)}
+\lineii{\e n} {\ASCII{} Linefeed (LF)}
+\lineii{\e r} {\ASCII{} Carriage Return (CR)}
+\lineii{\e t} {\ASCII{} Horizontal Tab (TAB)}
+\lineii{\e v} {\ASCII{} Vertical Tab (VT)}
+\lineii{\e\var{ooo}} {\ASCII{} character with octal value \emph{ooo}}
+\lineii{\e x\var{hh...}} {\ASCII{} character with hex value \emph{hh...}}
+\end{tableii}
\index{ASCII@\ASCII{}}
In strict compatibility with Standard \C, up to three octal digits are