Changeset ce6c57c
- Timestamp:
- Sep 19, 2015, 8:25:07 AM (9 years ago)
- 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
- Location:
- doc/refrat
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/refrat/Makefile
r2f9956b rce6c57c 32 32 33 33 clean : 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} 35 36 36 37 # File Dependencies # … … 42 43 dvips $< -o $@ 43 44 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 45 52 ${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 47 55 makeindex -s indexstyle ${basename $@}.idx 48 56 ${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 55 58 ${LaTeX} ${basename $@}.tex 56 -${BibTeX} ${basename $@}57 59 58 60 ## Define the default recipes. -
doc/refrat/refrat.tex
r2f9956b rce6c57c 2 2 3 3 \documentclass[openright,twoside]{report} 4 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 5 6 % Latex packages used in the document. 7 4 8 \usepackage{fullpage,times} 5 9 \usepackage{xspace} … … 13 17 \usepackage{breakurl} 14 18 \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. 15 32 16 33 %\input code.sty … … 52 69 \newcommand{\VPageref}[2][page]{\ifx#1\@empty\else{#1}\nobreakspace\fi\pageref{#2}} 53 70 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 name58 59 71 % replace/adjust characters that look bad in sanserif 60 72 \makeatletter … … 63 75 \lst@ProcessOther{"3C}{\lst@ttfamily{<}{\texttt{<}}} % replace less than 64 76 \lst@ProcessOther{"3E}{\lst@ttfamily{<}{\texttt{>}}} % replace greater than 65 \lst@ProcessOther{"5E}{ $\sim$} % circumflex77 \lst@ProcessOther{"5E}{\raisebox{0.4ex}{$\scriptstyle\land\,$}} % circumflex 66 78 \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 68 81 \@empty\z@\@empty 69 82 … … 74 87 75 88 \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,}, 77 91 } 78 92 … … 84 98 xleftmargin=\parindent, 85 99 escapechar=@, 100 %fancyvrb=true, 86 101 %showtabs=true, 87 %tab=\rightarrowfill, 102 keepspaces=true, 103 showtabs=true, 104 tab=, 88 105 } 89 106 … … 91 108 \setcounter{tocdepth}{3} % subsubsections in table of contents 92 109 \makeindex 110 111 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 93 112 94 113 \begin{document} … … 4036 4055 \section{Statements and blocks} 4037 4056 4057 \begin{syntax} 4058 \oldlhs{statement} 4059 \rhs \nonterm{exception-statement} 4060 \end{syntax} 4061 4038 4062 Many statements contain expressions, which may have more than one interpretation. The following 4039 4063 sections describe how the \CFA translator selects an interpretation. In all cases the result of the … … 4058 4082 The following have identical meaning: 4059 4083 \begin{lstlisting} 4060 case 1: @\ \ @case 2:@\ \ @case 3:@\ \ @case 4:@\ \ @case 5:4084 case 1: case 2: case 3: case 4: case 5: 4061 4085 case 1, 2, 3, 4, 5: 4062 4086 case 1~5: … … 4067 4091 \end{lstlisting} 4068 4092 4069 The \lstinline$case$ and \lstinline$default$ clauses are restricted within the \lstinline$switch$ and \lstinline$choose$ statements, precluding Duff's device. 4093 The \lstinline$case$ and \lstinline$default$ clauses are restricted within the \lstinline$switch$ 4094 and \lstinline$choose$ statements, precluding Duff's device. 4070 4095 4071 4096 … … 4122 4147 \end{tabular} 4123 4148 \end{flushleft} 4124 The \lstinline$choose$ statement addresses the problem of accidental fall-through associated with \lstinline$switch$ statement. 4149 The \lstinline$choose$ statement addresses the problem of accidental fall-through associated with 4150 the \lstinline$switch$ statement. 4125 4151 4126 4152 … … 4151 4177 \rhs \lstinline$continue$ \nonterm{identifier}\opt 4152 4178 \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 4153 4182 \end{syntax} 4154 4183 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. 4184 Labeled \lstinline$continue$ and \lstinline$break$ allow useful but restricted control-flow that 4185 reduces the need for the \lstinline$goto$ statement for exiting multiple nested control-structures. 4156 4186 \begin{lstlisting} 4157 4187 L1: { // compound 4158 4188 L2: switch ( ... ) { // switch 4159 4189 case ...: 4160 4190 L3: for ( ;; ) { // outer for 4161 4191 L4: for ( ;; ) { // inner for … … 4192 4222 \subsubsection{The \lstinline$return$ statement} 4193 4223 4194 An expression in a \lstinline$return$ statement is treated as being cast to the result type of the 4195 function. 4224 An 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 4229 When 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 4271 The \lstinline$try$ statement is a block with associated handlers, called a \Index{guarded block}; 4272 all other blocks are \Index{unguarded block}s. 4273 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. 4274 4275 4276 \subsubsection{The \lstinline$enable$/\lstinline$disable$ statements} 4277 4278 The \lstinline$enable$/\lstinline$disable$ statements toggle when \Index{asynchronous exception}s can or cannot be delivered. 4196 4279 4197 4280
Note: See TracChangeset
for help on using the changeset viewer.