Changes in / [8ee15ffd:d0d9610]


Ignore:
Location:
doc/refrat
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • doc/refrat/Makefile

    r8ee15ffd rd0d9610  
    77## Define the text source files.
    88
    9 SOURCES = ${addsuffix .tex, \
     9SOURCE = ${addsuffix .tex, \
    1010refrat \
    1111}
     
    3232
    3333clean :
    34         rm -f *.bbl *.aux *.dvi *.idx *.ilg *.ind *.brf *.out *.log *.toc *.blg *.pstex_t \
    35                 ${FIGURES} ${PICTURES} ${PROGRAMS} ${GRAPHS} ${basename ${DOCUMENT}}.ps ${DOCUMENT}
     34        rm -f *.bbl *.aux *.dvi *.idx *.ilg *.ind *.brf *.out *.log *.toc *.blg *.pstex_t ${FIGURES} ${PICTURES} ${PROGRAMS} ${GRAPHS} ${basename ${DOCUMENT}}.ps ${DOCUMENT}
    3635
    3736# File Dependencies #
     
    4342        dvips $< -o $@
    4443
    45 ${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCES} ${basename ${DOCUMENT}}.tex ${basename ${DOCUMENT}}.bib
    46         # Conditionally create an empty *.ind (index) file for inclusion until makeindex is run.
     44${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCE} ${basename ${DOCUMENT}}.bbl
     45        ${LaTeX} ${basename $@}.tex
     46        if fgrep -s "Label(s) may have changed" ${basename $@}.log ; then ${LaTeX} ${basename $@}.tex ; fi
     47        makeindex -s indexstyle ${basename $@}.idx
     48        ${LaTeX} ${basename $@}.tex
     49        ${LaTeX} ${basename $@}.tex             % to get index title in toc
     50
     51${basename ${DOCUMENT}}.bbl : ${basename ${DOCUMENT}}.tex ${basename ${DOCUMENT}}.bib
    4752        if [ ! -r ${basename $@}.ind ] ; then touch ${basename $@}.ind ; fi
    48         # Must have *.aux file containing citations for bibtex
    4953        if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi
    5054        -${BibTeX} ${basename $@}
    51         # Some citations reference others so run steps again to resolve these citations
    5255        ${LaTeX} ${basename $@}.tex
    5356        -${BibTeX} ${basename $@}
    54         # Make index from *.aux entries and input index at end of document
    55         makeindex -s indexstyle ${basename $@}.idx
    56         ${LaTeX} ${basename $@}.tex
    57         # Run again to get index title into table of contents
    58         ${LaTeX} ${basename $@}.tex
    5957
    6058## Define the default recipes.
  • doc/refrat/refrat.tex

    r8ee15ffd rd0d9610  
    22
    33\documentclass[openright,twoside]{report}
    4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    5 
    6 % Latex packages used in the document.
    7 
    84\usepackage{fullpage,times}
    95\usepackage{xspace}
     
    1814\urlstyle{sf}
    1915
    20 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    21 
    22 % Names used in the document.
    23 
    24 \newcommand{\CFA}{Cforall\xspace}               % set language text name
    25 \newcommand{\CFAA}{C$\forall$\xspace}   % set language symbolic name
    26 \newcommand{\CC}{C\kern-.1em\hbox{+\kern-.25em+}\xspace} % CC symbolic name
    27 \def\c11{ISO/IEC C} % C11 name (cannot have numbers in latex command name)
    28 
    29 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    30 
    31 % Specialized macros used in the document.
    32 
    33 \newcommand{\italic}[1]{\emph{\hyperpage{#1}}}
    34 \newcommand{\definition}[1]{\textbf{\hyperpage{#1}}}
    35 \newcommand{\see}[1]{\emph{see} #1}
    36 
    37 \makeatletter
    38 % Define some commands that produce formatted index entries suitable for cross-references.
    39 % ``\spec'' produces entries for specifications of entities.  ``\impl'' produces entries for their
    40 % implementations, and ``\use'' for their uses.
    41 
    42 %  \newcommand{\bold}[1]{{\bf #1}}
    43 %  \def\spec{\@bsphack\begingroup
    44 %             \def\protect##1{\string##1\space}\@sanitize
    45 %             \@wrxref{|bold}}
    46 \def\impl{\@bsphack\begingroup
    47           \def\protect##1{\string##1\space}\@sanitize
    48           \@wrxref{|definition}}
    49 \newcommand{\indexcode}[1]{{\lstinline$#1$}}
    50 \def\use{\@bsphack\begingroup
    51          \def\protect##1{\string##1\space}\@sanitize
    52          \@wrxref{|hyperpage}}
    53 \def\@wrxref#1#2{\let\thepage\relax
    54     \xdef\@gtempa{\write\@indexfile{\string
    55     \indexentry{#2@{\lstinline$#2$}#1}{\thepage}}}\endgroup\@gtempa
    56     \if@nobreak \ifvmode\nobreak\fi\fi\@esphack}
    57 \makeatother
    58 %\newcommand{\use}[1]{\index{#1@{\lstinline$#1$}}}
    59 %\newcommand{\impl}[1]{\index{\protect#1@{\lstinline$\protect#1$}|definition}}
     16%\input code.sty
     17\input xref.tex
    6018
    6119\newcommand{\define}[1]{\emph{#1\/}\index{#1}}
     
    7937\def\syntax{\paragraph{Syntax}\trivlist\parindent=.5in\item[\hskip.5in]}
    8038\let\endsyntax=\endtrivlist
    81 \newcommand{\lhs}[1]{\par{\emph{#1:}}\index{#1@{\emph{#1}}|italic}}
     39\newcommand{\lhs}[1]{\par{\it #1:}\index{#1@{\it #1}|italic}}
    8240\newcommand{\rhs}{\hfil\break\hbox{\hskip1in}}
    83 \newcommand{\oldlhs}[1]{\emph{#1: \ldots}\index{#1@{\emph{#1}}|italic}}
    84 \newcommand{\nonterm}[1]{\emph{#1\/}\index{#1@{\emph{#1}}|italic}}
     41\newcommand{\oldlhs}[1]{{\it #1: \ldots}\index{#1@{\it #1}|italic}}
     42\newcommand{\nonterm}[1]{{\it #1\/}\index{#1@{\it #1}|italic}}
    8543\newcommand{\opt}{$_{opt}$\ }
    8644
     
    9452\newcommand{\VPageref}[2][page]{\ifx#1\@empty\else{#1}\nobreakspace\fi\pageref{#2}}
    9553
     54\newcommand{\CFA}{Cforall\xspace}
     55\newcommand{\CFAA}{C$\forall$\xspace}
     56\newcommand{\CC}{C\kern-.1em\hbox{+\kern-.25em+}\xspace}
     57\def\c11{ISO/IEC C}% cannot have numbers in latex command name
     58
    9659% replace/adjust characters that look bad in sanserif
    9760\makeatletter
     
    10063\lst@ProcessOther{"3C}{\lst@ttfamily{<}{\texttt{<}}} % replace less than
    10164\lst@ProcessOther{"3E}{\lst@ttfamily{<}{\texttt{>}}} % replace greater than
    102 \lst@ProcessOther{"5E}{\raisebox{0.4ex}{$\scriptstyle\land\,$}} % circumflex
     65\lst@ProcessOther{"5E}{$\sim$} % circumflex
    10366\lst@ProcessLetter{"5F}{\lst@ttfamily{\char95}{{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}}} % replace underscore
    104 %\lst@ProcessOther{"7E}{\raisebox{-.4ex}[1ex][0pt]{\textasciitilde}} % lower tilde
    105 \lst@ProcessOther{"7E}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}} % lower tilde
     67\lst@ProcessOther{"7E}{\raisebox{-.4ex}[1ex][0pt]{\textasciitilde}} % lower tilde
    10668\@empty\z@\@empty
    10769
     
    11274
    11375\lstdefinelanguage{CFA}[ANSI]{C}%
    114   {morekeywords={asm,_Atomic,catch,catchResume,choose,_Complex,context,disable,dtype,enable,
    115         fallthru,finally,forall,ftype,_Imaginary,lvalue,restrict,throw,throwResume,try,type,},
     76  {morekeywords={asm,_Atomic,catch,choose,_Complex,context,dtype,fallthru,forall,ftype,_Imaginary,lvalue,restrict,throw,try,type,},
    11677}
    11778
     
    12384xleftmargin=\parindent,
    12485escapechar=@,
    125 %fancyvrb=true,
    12686%showtabs=true,
    127 keepspaces=true,
    128 showtabs=true,
    129 tab=,
     87%tab=\rightarrowfill,
    13088}
    13189
     
    13391\setcounter{tocdepth}{3}                % subsubsections in table of contents
    13492\makeindex
    135 
    136 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    13793
    13894\begin{document}
     
    735691
    736692\examples
    737 The expression \lstinline$(void *)0$\use{0} specializes the (polymorphic) null pointer to a null
     693The expression \lstinline$(void *)0}$\use{0} specializes the (polymorphic) null pointer to a null
    738694pointer to \lstinline$void$. \lstinline$(const void *)0$ does the same, and also uses a safe
    739695conversion from \lstinline$void *$ to \lstinline$const void *$. In each case, the null pointer
     
    24692425
    24702426The operands of the expression ``\lstinline$a || b$'' are treated as ``\lstinline$(int)((a)!=0)$''
    2471 and ``\lstinline$(int)((b))!=0)$'', which shall both be unambiguous. The expression has only one
     2427and ``\lstinline$(int)((b})!=0)$'', which shall both be unambiguous. The expression has only one
    24722428interpretation, which is of type \lstinline$int$.
    24732429
     
    40804036\section{Statements and blocks}
    40814037
    4082 \begin{syntax}
    4083 \oldlhs{statement}
    4084 \rhs \nonterm{exception-statement}
    4085 \end{syntax}
    4086 
    40874038Many statements contain expressions, which may have more than one interpretation. The following
    40884039sections describe how the \CFA translator selects an interpretation. In all cases the result of the
     
    41074058The following have identical meaning:
    41084059\begin{lstlisting}
    4109 case 1:  case 2:  case 3:  case 4:  case 5:
     4060case 1:@\ \ @case 2:@\ \ @case 3:@\ \ @case 4:@\ \ @case 5:
    41104061case 1, 2, 3, 4, 5:
    41114062case 1~5:
    41124063\end{lstlisting}
    4113 Multiple subranges are allowed:
     4064The multiple subranges are allowed:
    41144065\begin{lstlisting}
    41154066case 1~4, 9~14, 27~32:
    41164067\end{lstlisting}
     4068
    41174069The \lstinline$case$ and \lstinline$default$ clauses are restricted within the \lstinline$switch$ and \lstinline$choose$ statements, precluding Duff's device.
    41184070
     
    41354087choose ( E ) ...
    41364088\end{lstlisting}
    4137 may have more than one interpretation, but it shall have only one interpretation with an integral type.
    4138 An \Index{integer promotion} is performed on the expression if necessary.
    4139 The constant expressions in \lstinline$case$ statements with the switch are converted to the promoted type.
     4089may have more than one interpretation, but it shall have only one interpretation with an integral
     4090type. An \Index{integer promotion} is performed on the expression if necessary.  The constant
     4091expressions in \lstinline$case$ statements with the switch are converted to the promoted type.
    41404092
    41414093
     
    41454097The \lstinline$choose$ statement is the same as the \lstinline$switch$ statement except control transfers to the end of the \lstinline$choose$ statement at a \lstinline$case$ or \lstinline$default$ labeled statement.
    41464098The \lstinline$fallthru$ statement is used to fall through to the next \lstinline$case$ or \lstinline$default$ labeled statement.
     4099
    41474100The following have identical meaning:
    41484101\begin{flushleft}
     
    41694122\end{tabular}
    41704123\end{flushleft}
    4171 The \lstinline$choose$ statement addresses the problem of accidental fall-through associated with the \lstinline$switch$ statement.
     4124The \lstinline$choose$ statement addresses the problem of accidental fall-through associated with \lstinline$switch$ statement.
    41724125
    41734126
     
    41984151\rhs \lstinline$continue$ \nonterm{identifier}\opt
    41994152\rhs \lstinline$break$ \nonterm{identifier}\opt
    4200 \rhs \ldots
    4201 \rhs \lstinline$throw$ \nonterm{assignment-expression}\opt
    4202 \rhs \lstinline$throwResume$ \nonterm{assignment-expression}\opt \nonterm{at-expression}\opt
    4203 \lhs{at-expression} \lstinline$_At$ \nonterm{assignment-expression}
    42044153\end{syntax}
    42054154
     
    42084157L1: {                                                   // compound
    42094158  L2: switch ( ... ) {                  // switch
    4210           case ...:
     4159    case ...:
    42114160          L3: for ( ;; ) {                      // outer for
    42124161                L4: for ( ;; ) {                // inner for
     
    42434192\subsubsection{The \lstinline$return$ statement}
    42444193
    4245 An expression in a \lstinline$return$ statement is treated as being cast to the result type of the function.
    4246 
    4247 
    4248 \subsubsection{The \lstinline$throw$ statement}
    4249 
    4250 When an exception is raised, \Index{propagation} directs control from a raise in the source execution to a handler in the faulting execution.
    4251 
    4252 
    4253 \subsubsection{The \lstinline$throwResume$ statement}
    4254 
    4255 
    4256 \subsection{Exception statements}
    4257 
    4258 \begin{syntax}
    4259 \lhs{exception-statement}
    4260 \rhs \lstinline$try$ \nonterm{compound-statement} \nonterm{handler-list}
    4261 \rhs \lstinline$try$ \nonterm{compound-statement} \nonterm{finally-clause}
    4262 \rhs \lstinline$try$ \nonterm{compound-statement} \nonterm{handler-list} \nonterm{finally-clause}
    4263 \lhs{handler-list}
    4264 \rhs \nonterm{handler-clause}
    4265 \rhs \lstinline$catch$ \lstinline$($ \ldots \lstinline$)$ \nonterm{compound-statement}
    4266 \rhs \nonterm{handler-clause} \lstinline$catch$ \lstinline$($ \ldots \lstinline$)$ \nonterm{compound-statement}
    4267 \rhs \lstinline$catchResume$ \lstinline$($ \ldots \lstinline$)$ \nonterm{compound-statement}
    4268 \rhs \nonterm{handler-clause} \lstinline$catchResume$ \lstinline$($ \ldots \lstinline$)$ \nonterm{compound-statement}
    4269 \lhs{handler-clause}
    4270 \rhs \lstinline$catch$ \lstinline$($ \nonterm{exception-declaration} \lstinline$)$ \nonterm{compound-statement}
    4271 \rhs \nonterm{handler-clause} \lstinline$catch$ \lstinline$($ \nonterm{exception-declaration} \lstinline$)$ \nonterm{compound-statement}
    4272 \rhs \lstinline$catchResume$ \lstinline$($ \nonterm{exception-declaration} \lstinline$)$ \nonterm{compound-statement}
    4273 \rhs \nonterm{handler-clause} \lstinline$catchResume$ \lstinline$($ \nonterm{exception-declaration} \lstinline$)$ \nonterm{compound-statement}
    4274 \lhs{finally-clause}
    4275 \rhs \lstinline$finally$ \nonterm{compound-statement}
    4276 \lhs{exception-declaration}
    4277 \rhs \nonterm{type-specifier}
    4278 \rhs \nonterm{type-specifier} \nonterm{declarator}
    4279 \rhs \nonterm{type-specifier} \nonterm{abstract-declarator}
    4280 \rhs \nonterm{new-abstract-declarator-tuple} \nonterm{identifier}
    4281 \rhs \nonterm{new-abstract-declarator-tuple}
    4282 \lhs{asynchronous-statement}
    4283 \rhs \lstinline$enable$ \nonterm{identifier-list} \nonterm{compound-statement}
    4284 \rhs \lstinline$disable$ \nonterm{identifier-list} \nonterm{compound-statement}
    4285 \end{syntax}
    4286 
    4287 \Index{Exception statement}s allow a dynamic call to a handler for \Index{recovery} (\Index{termination}) or \Index{correction} (\Index{resumption}) of an \Index{abnormal event}.
    4288 
    4289 
    4290 \subsubsection{The \lstinline$try$ statement}
    4291 
    4292 The \lstinline$try$ statement is a block with associated handlers, called a \Index{guarded block};
    4293 all other blocks are \Index{unguarded block}s.
    4294 A \lstinline$goto$, \lstinline$break$, \lstinline$return$, or \lstinline$continue$ statement can be used to transfer control out of a try block or handler, but not into one.
    4295 
    4296 
    4297 \subsubsection{The \lstinline$enable$/\lstinline$disable$ statements}
    4298 
    4299 The \lstinline$enable$/\lstinline$disable$ statements toggle delivery of \Index{asynchronous exception}s.
     4194An expression in a \lstinline$return$ statement is treated as being cast to the result type of the
     4195function.
    43004196
    43014197
Note: See TracChangeset for help on using the changeset viewer.