Changeset 51b5a02 for doc


Ignore:
Timestamp:
Feb 4, 2018, 12:21:38 PM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
bf7b6015, cbe477e
Parents:
d03fa6d
Message:

adjust macros

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/papers/general/Paper.tex

    rd03fa6d r51b5a02  
    130130
    131131\lstnewenvironment{cfa}[1][]
    132 {\CFA\lstset{#1}}
     132{\lstset{#1}}
    133133{}
    134134\lstnewenvironment{C++}[1][]                            % use C++ style
    135 {\lstset{language=C++,moredelim=**[is][\protect\color{red}]{`}{`},#1}}
     135{\lstset{language=C++,moredelim=**[is][\protect\color{red}]{`}{`},#1}\lstset{#1}}
    136136{}
    137137
     
    946946\begin{tabular}{@{\hspace{\parindentlnth}}l@{\hspace{\parindentlnth}}l@{\hspace{\parindentlnth}}l@{}}
    947947\multicolumn{1}{@{\hspace{\parindentlnth}}c@{\hspace{\parindentlnth}}}{\textbf{\CFA}}   & \multicolumn{1}{@{\hspace{\parindentlnth}}c}{\textbf{C}}      \\
    948 \begin{lstlisting}
     948\begin{cfa}
    949949`LC:` {
    950950        ... $declarations$ ...
     
    968968        } // switch
    969969} // compound
    970 \end{lstlisting}
     970\end{cfa}
    971971&
    972 \begin{lstlisting}
     972\begin{cfa}
    973973{
    974974        ... $declarations$ ...
     
    992992        } `LS:` ;
    993993} `LC:` ;
    994 \end{lstlisting}
     994\end{cfa}
    995995&
    996 \begin{lstlisting}
     996\begin{cfa}
    997997
    998998
     
    10161016
    10171017
    1018 \end{lstlisting}
     1018\end{cfa}
    10191019\end{tabular}
    10201020\lstMakeShortInline@%
     
    10551055        int i, j;
    10561056        int mem() {                                     $\C{\color{red}// implicit "this" parameter}$
    1057                 i = 1;                                  $\C{\color{red}// this->i}$
    1058                 j = 2;                                  $\C{\color{red}// this->j}$
     1057                i = 1;                                  $\C{\color{red}// this-{\textgreater}i}$
     1058                j = 2;                                  $\C{\color{red}// this-{\textgreater}j}$
    10591059        }
    10601060}
    10611061\end{C++}
    1062 Since CFA is non-object-oriented, the equivalent object-oriented program looks like:
     1062Since \CFA is non-object-oriented, the equivalent object-oriented program looks like:
    10631063\begin{cfa}
    10641064struct S { int i, j; };
     
    11881188
    11891189{\lstset{language=CFA,deletedelim=**[is][]{`}{`},moredelim=**[is][\color{red}]{@}{@}}
    1190 \begin{lstlisting}
     1190\begin{cfa}
    11911191struct Weight { double stones; };
    11921192
     
    12081208        w = 5@`st@ + 8@`kg@ + 25@`lb@ + hw;
    12091209}
    1210 \end{lstlisting}
     1210\end{cfa}
    12111211}%
    12121212
Note: See TracChangeset for help on using the changeset viewer.