Changeset ce6c57c


Ignore:
Timestamp:
Sep 19, 2015, 8:25:07 AM (9 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
865249a
Parents:
2f9956b
Message:

simplify Makefile, add material on exception statements

Location:
doc/refrat
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • doc/refrat/Makefile

    r2f9956b rce6c57c  
    3232
    3333clean :
    34         rm -f *.bbl *.aux *.dvi *.idx *.ilg *.ind *.brf *.out *.log *.toc *.blg *.pstex_t ${FIGURES} ${PICTURES} ${PROGRAMS} ${GRAPHS} ${basename ${DOCUMENT}}.ps ${DOCUMENT}
     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}
    3536
    3637# File Dependencies #
     
    4243        dvips $< -o $@
    4344
    44 ${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCE} ${basename ${DOCUMENT}}.bbl
     45${basename ${DOCUMENT}}.dvi : Makefile ${GRAPHS} ${PROGRAMS} ${PICTURES} ${FIGURES} ${SOURCE} ${basename ${DOCUMENT}}.tex ${basename ${DOCUMENT}}.bib
     46        # Conditionally create an empty *.ind (index) file for inclusion until makeindex is run.
     47        if [ ! -r ${basename $@}.ind ] ; then touch ${basename $@}.ind ; fi
     48        # Must have *.aux file containing citations for bibtex
     49        if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi
     50        -${BibTeX} ${basename $@}
     51        # Some citations reference others so run steps again to resolve these citations
    4552        ${LaTeX} ${basename $@}.tex
    46         if fgrep -s "Label(s) may have changed" ${basename $@}.log ; then ${LaTeX} ${basename $@}.tex ; fi
     53        -${BibTeX} ${basename $@}
     54        # Make index from *.aux entries and input index at end of document
    4755        makeindex -s indexstyle ${basename $@}.idx
    4856        ${LaTeX} ${basename $@}.tex
    49         ${LaTeX} ${basename $@}.tex             % to get index title in toc
    50 
    51 ${basename ${DOCUMENT}}.bbl : ${basename ${DOCUMENT}}.tex ${basename ${DOCUMENT}}.bib
    52         if [ ! -r ${basename $@}.ind ] ; then touch ${basename $@}.ind ; fi
    53         if [ ! -r ${basename $@}.aux ] ; then ${LaTeX} ${basename $@}.tex ; fi
    54         -${BibTeX} ${basename $@}
     57        # Run again to get index title into table of contents
    5558        ${LaTeX} ${basename $@}.tex
    56         -${BibTeX} ${basename $@}
    5759
    5860## Define the default recipes.
  • doc/refrat/refrat.tex

    r2f9956b rce6c57c  
    22
    33\documentclass[openright,twoside]{report}
     4%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     5
     6% Latex packages used in the document.
     7
    48\usepackage{fullpage,times}
    59\usepackage{xspace}
     
    1317\usepackage{breakurl}
    1418\urlstyle{sf}
     19
     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.
    1532
    1633%\input code.sty
     
    5269\newcommand{\VPageref}[2][page]{\ifx#1\@empty\else{#1}\nobreakspace\fi\pageref{#2}}
    5370
    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 
    5971% replace/adjust characters that look bad in sanserif
    6072\makeatletter
     
    6375\lst@ProcessOther{"3C}{\lst@ttfamily{<}{\texttt{<}}} % replace less than
    6476\lst@ProcessOther{"3E}{\lst@ttfamily{<}{\texttt{>}}} % replace greater than
    65 \lst@ProcessOther{"5E}{$\sim$} % circumflex
     77\lst@ProcessOther{"5E}{\raisebox{0.4ex}{$\scriptstyle\land\,$}} % circumflex
    6678\lst@ProcessLetter{"5F}{\lst@ttfamily{\char95}{{\makebox[1.2ex][c]{\rule{1ex}{0.1ex}}}}} % replace underscore
    67 \lst@ProcessOther{"7E}{\raisebox{-.4ex}[1ex][0pt]{\textasciitilde}} % lower tilde
     79%\lst@ProcessOther{"7E}{\raisebox{-.4ex}[1ex][0pt]{\textasciitilde}} % lower tilde
     80\lst@ProcessOther{"7E}{\raisebox{0.3ex}{$\scriptstyle\sim\,$}} % lower tilde
    6881\@empty\z@\@empty
    6982
     
    7487
    7588\lstdefinelanguage{CFA}[ANSI]{C}%
    76   {morekeywords={asm,_Atomic,catch,choose,_Complex,context,dtype,fallthru,forall,ftype,_Imaginary,lvalue,restrict,throw,try,type,},
     89  {morekeywords={asm,_Atomic,catch,catchResume,choose,_Complex,context,disable,dtype,enable,
     90        fallthru,finally,forall,ftype,_Imaginary,lvalue,restrict,throw,throwResume,try,type,},
    7791}
    7892
     
    8498xleftmargin=\parindent,
    8599escapechar=@,
     100%fancyvrb=true,
    86101%showtabs=true,
    87 %tab=\rightarrowfill,
     102keepspaces=true,
     103showtabs=true,
     104tab=,
    88105}
    89106
     
    91108\setcounter{tocdepth}{3}                % subsubsections in table of contents
    92109\makeindex
     110
     111%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    93112
    94113\begin{document}
     
    40364055\section{Statements and blocks}
    40374056
     4057\begin{syntax}
     4058\oldlhs{statement}
     4059\rhs \nonterm{exception-statement}
     4060\end{syntax}
     4061
    40384062Many statements contain expressions, which may have more than one interpretation. The following
    40394063sections describe how the \CFA translator selects an interpretation. In all cases the result of the
     
    40584082The following have identical meaning:
    40594083\begin{lstlisting}
    4060 case 1:@\ \ @case 2:@\ \ @case 3:@\ \ @case 4:@\ \ @case 5:
     4084case 1:  case 2:  case 3:  case 4:  case 5:
    40614085case 1, 2, 3, 4, 5:
    40624086case 1~5:
     
    40674091\end{lstlisting}
    40684092
    4069 The \lstinline$case$ and \lstinline$default$ clauses are restricted within the \lstinline$switch$ and \lstinline$choose$ statements, precluding Duff's device.
     4093The \lstinline$case$ and \lstinline$default$ clauses are restricted within the \lstinline$switch$
     4094and \lstinline$choose$ statements, precluding Duff's device.
    40704095
    40714096
     
    41224147\end{tabular}
    41234148\end{flushleft}
    4124 The \lstinline$choose$ statement addresses the problem of accidental fall-through associated with \lstinline$switch$ statement.
     4149The \lstinline$choose$ statement addresses the problem of accidental fall-through associated with
     4150the \lstinline$switch$ statement.
    41254151
    41264152
     
    41514177\rhs \lstinline$continue$ \nonterm{identifier}\opt
    41524178\rhs \lstinline$break$ \nonterm{identifier}\opt
     4179\rhs \ldots
     4180\rhs \lstinline$throw$ \nonterm{assignment-expression}\opt
     4181\rhs \lstinline$throwResume$ \nonterm{assignment-expression}\opt
    41534182\end{syntax}
    41544183
    4155 Labeled \lstinline$continue$ and \lstinline$break$ allow useful but restricted control-flow that reduces the need for the \lstinline$goto$ statement for exiting multiple nested control-structures.
     4184Labeled \lstinline$continue$ and \lstinline$break$ allow useful but restricted control-flow that
     4185reduces the need for the \lstinline$goto$ statement for exiting multiple nested control-structures.
    41564186\begin{lstlisting}
    41574187L1: {                                                   // compound
    41584188  L2: switch ( ... ) {                  // switch
    4159     case ...:
     4189          case ...:
    41604190          L3: for ( ;; ) {                      // outer for
    41614191                L4: for ( ;; ) {                // inner for
     
    41924222\subsubsection{The \lstinline$return$ statement}
    41934223
    4194 An expression in a \lstinline$return$ statement is treated as being cast to the result type of the
    4195 function.
     4224An expression in a \lstinline$return$ statement is treated as being cast to the result type of the function.
     4225
     4226
     4227\subsubsection{The \lstinline$throw$ statement}
     4228
     4229When an exception is raised, \Index{propagation} directs control from a raise in the source execution to a handler in the faulting execution.
     4230
     4231
     4232\subsubsection{The \lstinline$throwResume$ statement}
     4233
     4234
     4235\subsection{Exception statements}
     4236
     4237\begin{syntax}
     4238\lhs{exception-statement}
     4239\rhs \lstinline$try$ \nonterm{compound-statement} \nonterm{handler-list}
     4240\rhs \lstinline$try$ \nonterm{compound-statement} \nonterm{finally-clause}
     4241\rhs \lstinline$try$ \nonterm{compound-statement} \nonterm{handler-list} \nonterm{finally-clause}
     4242\lhs{handler-list}
     4243\rhs \nonterm{handler-clause}
     4244\rhs \lstinline$catch$ \lstinline$($ \ldots \lstinline$)$ \nonterm{compound-statement}
     4245\rhs \nonterm{handler-clause} \lstinline$catch$ \lstinline$($ \ldots \lstinline$)$ \nonterm{compound-statement}
     4246\rhs \lstinline$catchResume$ \lstinline$($ \ldots \lstinline$)$ \nonterm{compound-statement}
     4247\rhs \nonterm{handler-clause} \lstinline$catchResume$ \lstinline$($ \ldots \lstinline$)$ \nonterm{compound-statement}
     4248\lhs{handler-clause}
     4249\rhs \lstinline$catch$ \lstinline$($ \nonterm{exception-declaration} \lstinline$)$ \nonterm{compound-statement}
     4250\rhs \nonterm{handler-clause} \lstinline$catch$ \lstinline$($ \nonterm{exception-declaration} \lstinline$)$ \nonterm{compound-statement}
     4251\rhs \lstinline$catchResume$ \lstinline$($ \nonterm{exception-declaration} \lstinline$)$ \nonterm{compound-statement}
     4252\rhs \nonterm{handler-clause} \lstinline$catchResume$ \lstinline$($ \nonterm{exception-declaration} \lstinline$)$ \nonterm{compound-statement}
     4253\lhs{finally-clause}
     4254\rhs \lstinline$finally$ \nonterm{compound-statement}
     4255\lhs{exception-declaration}
     4256\rhs \nonterm{type-specifier}
     4257\rhs \nonterm{type-specifier} \nonterm{declarator}
     4258\rhs \nonterm{type-specifier} \nonterm{abstract-declarator}
     4259\rhs \nonterm{new-abstract-declarator-tuple} \nonterm{identifier}
     4260\rhs \nonterm{new-abstract-declarator-tuple}
     4261\lhs{asynchronous-statement}
     4262\rhs \lstinline$enable$ \nonterm{identifier-list} \nonterm{compound-statement}
     4263\rhs \lstinline$disable$ \nonterm{identifier-list} \nonterm{compound-statement}
     4264\end{syntax}
     4265
     4266\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}.
     4267
     4268
     4269\subsubsection{The \lstinline$try$ statement}
     4270
     4271The \lstinline$try$ statement is a block with associated handlers, called a \Index{guarded block};
     4272all other blocks are \Index{unguarded block}s.
     4273A \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.
     4274
     4275
     4276\subsubsection{The \lstinline$enable$/\lstinline$disable$ statements}
     4277
     4278The \lstinline$enable$/\lstinline$disable$ statements toggle when \Index{asynchronous exception}s can or cannot be delivered.
    41964279
    41974280
Note: See TracChangeset for help on using the changeset viewer.