Ignore:
Timestamp:
Apr 17, 2018, 12:01:09 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
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, with_gc
Children:
3265399
Parents:
b2fe1c9 (diff), 81bb114 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/papers/concurrency/style/cfa-format.tex

    rb2fe1c9 r32cab5b  
    1 \usepackage[usenames,dvipsnames]{xcolor}
     1%\usepackage[usenames,dvipsnames]{xcolor}
    22\usepackage{listings}
    33\usepackage{inconsolata}
     
    1111% from https://gist.github.com/nikolajquorning/92bbbeef32e1dd80105c9bf2daceb89a
    1212\lstdefinelanguage{sml} {
    13   morekeywords= {
    14     EQUAL, GREATER, LESS, NONE, SOME, abstraction, abstype, and, andalso, array, as, before, bool, case, char, datatype, do, else, end, eqtype, exception, exn, false, fn, fun, functor, handle, if, in, include, infix, infixr, int, let, list, local, nil, nonfix, not, o, of, op, open, option, orelse, overload, print, raise, real, rec, ref, sharing, sig, signature, string, struct, structure, substring, then, true, type, unit, val, vector, where, while, with, withtype, word
    15   },
    16   morestring=[b]",
    17   morecomment=[s]{(*}{*)},
     13        morekeywords= {
     14                EQUAL, GREATER, LESS, NONE, SOME, abstraction, abstype, and, andalso, array, as, before,
     15                bool, case, char, datatype, do, else, end, eqtype, exception, exn, false, fn, fun, functor,
     16                handle, if, in, include, infix, infixr, int, let, list, local, nil, nonfix, not, o, of, op,
     17                open, option, orelse, overload, print, raise, real, rec, ref, sharing, sig, signature,
     18                string, struct, structure, substring, then, true, type, unit, val, vector, where, while,
     19                with, withtype, word
     20    },
     21    morestring=[b]",
     22    morecomment=[s]{(*}{*)},
    1823}
    1924
    2025\lstdefinelanguage{D}{
    21   % Keywords
    22   morekeywords=[1]{
    23     abstract, alias, align, auto, body, break, cast, catch, class, const,
    24     continue, debug, delegate, delete, deprecated, do, else, enum, export,
    25     false, final, finally, for, foreach, foreach_reverse, function, goto, if,
    26     immutable, import, in, inout, interface, invariant, is, lazy, macro, mixin,
    27     module, new, nothrow, null, out, override, package, pragma, private,
    28     protected, public, pure, ref, return, shared, static, struct, super,
    29     switch, synchronized, template, this, throw, true, try, typedef, typeid,
    30     typeof, union, unittest, volatile, while, with
    31   },
    32   % Special identifiers, common functions
    33   morekeywords=[2]{enforce},
    34   % Ugly identifiers
    35   morekeywords=[3]{
    36     __DATE__, __EOF__, __FILE__, __LINE__, __TIMESTAMP__, __TIME__, __VENDOR__,
    37     __VERSION__, __ctfe, __gshared, __monitor, __thread, __vptr, _argptr,
    38     _arguments, _ctor, _dtor
    39   },
    40   % Basic types
    41   morekeywords=[4]{
    42      byte, ubyte, short, ushort, int, uint, long, ulong, cent, ucent, void,
    43      bool, bit, float, double, real, ushort, int, uint, long, ulong, float,
    44      char, wchar, dchar, string, wstring, dstring, ireal, ifloat, idouble,
    45      creal, cfloat, cdouble, size_t, ptrdiff_t, sizediff_t, equals_t, hash_t
    46   },
    47   % Strings
    48   morestring=[b]{"},
    49   morestring=[b]{'},
    50   morestring=[b]{`},
    51   % Comments
    52   comment=[l]{//},
    53   morecomment=[s]{/*}{*/},
    54   morecomment=[s][\color{blue}]{/**}{*/},
    55   morecomment=[n]{/+}{+/},
    56   morecomment=[n][\color{blue}]{/++}{+/},
    57   % Options
    58   sensitive=true
     26        % Keywords
     27        morekeywords=[1]{
     28                abstract, alias, align, auto, body, break, cast, catch, class, const, continue, debug,
     29                delegate, delete, deprecated, do, else, enum, export, false, final, finally, for, foreach,
     30                foreach_reverse, function, goto, if, immutable, import, in, inout, interface, invariant, is,
     31                lazy, macro, mixin, module, new, nothrow, null, out, override, package, pragma, private,
     32                protected, public, pure, ref, return, shared, static, struct, super, switch, synchronized,
     33                template, this, throw, true, try, typedef, typeid, typeof, union, unittest, volatile, while,
     34                with
     35        },
     36        % Special identifiers, common functions
     37        morekeywords=[2]{enforce},
     38        % Ugly identifiers
     39        morekeywords=[3]{
     40                __DATE__, __EOF__, __FILE__, __LINE__, __TIMESTAMP__, __TIME__, __VENDOR__,
     41                __VERSION__, __ctfe, __gshared, __monitor, __thread, __vptr, _argptr,
     42                _arguments, _ctor, _dtor
     43        },
     44        % Basic types
     45        morekeywords=[4]{
     46                byte, ubyte, short, ushort, int, uint, long, ulong, cent, ucent, void, bool, bit, float,
     47                double, real, ushort, int, uint, long, ulong, float, char, wchar, dchar, string, wstring,
     48                dstring, ireal, ifloat, idouble, creal, cfloat, cdouble, size_t, ptrdiff_t, sizediff_t,
     49                equals_t, hash_t
     50        },
     51        % Strings
     52        morestring=[b]{"},
     53        morestring=[b]{'},
     54        morestring=[b]{`},
     55        % Comments
     56        comment=[l]{//},
     57        morecomment=[s]{/*}{*/},
     58        morecomment=[s][\color{blue}]{/**}{*/},
     59        morecomment=[n]{/+}{+/},
     60        morecomment=[n][\color{blue}]{/++}{+/},
     61        % Options
     62        sensitive=true
    5963}
    6064
    6165\lstdefinelanguage{rust}{
    62   % Keywords
    63   morekeywords=[1]{
    64     abstract, alignof, as, become, box,
    65     break, const, continue, crate, do,
    66     else, enum, extern, false, final,
    67     fn, for, if, impl, in,
    68     let, loop, macro, match, mod,
    69     move, mut, offsetof, override, priv,
    70     proc, pub, pure, ref, return,
    71     Self, self, sizeof, static, struct,
    72     super, trait, true,  type, typeof,
    73     unsafe, unsized, use, virtual, where,
    74     while, yield
    75   },
    76   % Strings
    77   morestring=[b]{"},
    78   % Comments
    79   comment=[l]{//},
    80   morecomment=[s]{/*}{*/},
    81   % Options
    82   sensitive=true
     66        % Keywords
     67        morekeywords=[1]{
     68                abstract, alignof, as, become, box, break, const, continue, crate, do, else, enum, extern,
     69                false, final, fn, for, if, impl, in, let, loop, macro, match, mod, move, mut, offsetof,
     70                override, priv, proc, pub, pure, ref, return, Self, self, sizeof, static, struct, super,
     71                trait, true, type, typeof, unsafe, unsized, use, virtual, where, while, yield
     72        },
     73        % Strings
     74        morestring=[b]{"},
     75        % Comments
     76        comment=[l]{//},
     77        morecomment=[s]{/*}{*/},
     78        % Options
     79        sensitive=true
    8380}
    8481
    8582\lstdefinelanguage{pseudo}{
    86         morekeywords={string,uint,int,bool,float},%
    87         sensitive=true,%
    88         morecomment=[l]{//},%
    89         morecomment=[s]{/*}{*/},%
    90         morestring=[b]',%
    91         morestring=[b]",%
    92         morestring=[s]{`}{`},%
    93 }%
     83        morekeywords={string,uint,int,bool,float},
     84        sensitive=true,
     85        morecomment=[l]{//},
     86        morecomment=[s]{/*}{*/},
     87        morestring=[b]',
     88        morestring=[b]",
     89        morestring=[s]{`}{`},
     90}
    9491
    9592\newcommand{\KWC}{K-W C\xspace}
    9693
    9794\lstdefinestyle{pseudoStyle}{
    98   escapeinside={@@},
    99   basicstyle=\linespread{0.9}\sf\footnotesize,          % reduce line spacing and use typewriter font
    100   keywordstyle=\bfseries\color{blue},
    101   keywordstyle=[2]\bfseries\color{Plum},
    102   commentstyle=\itshape\color{OliveGreen},                  % green and italic comments
    103   identifierstyle=\color{identifierCol},
    104   stringstyle=\sf\color{Mahogany},                                % use sanserif font
    105   mathescape=true,
    106   columns=fixed,
    107   aboveskip=4pt,                                  % spacing above/below code block
    108   belowskip=3pt,
    109   keepspaces=true,
    110   tabsize=4,
    111   % frame=lines,
    112   literate=,
    113   showlines=true,                                % show blank lines at end of code
    114   showspaces=false,
    115   showstringspaces=false,
    116   escapechar=\$,
    117   xleftmargin=\parindentlnth,                     % indent code to paragraph indentation
    118   moredelim=[is][\color{red}\bfseries]{**R**}{**R**},    % red highlighting
    119   % moredelim=* detects keywords, comments, strings, and other delimiters and applies their formatting
    120   % moredelim=** allows cumulative application
     95        escapeinside={@@},
     96        basicstyle=\linespread{0.9}\sf\footnotesize,            % reduce line spacing and use typewriter font
     97        keywordstyle=\bfseries\color{blue},
     98        keywordstyle=[2]\bfseries\color{Plum},
     99        commentstyle=\itshape\color{OliveGreen},                    % green and italic comments
     100        identifierstyle=\color{identifierCol},
     101        stringstyle=\sf\color{Mahogany},                                          % use sanserif font
     102        mathescape=true,
     103        columns=fixed,
     104        aboveskip=4pt,                                                            % spacing above/below code block
     105        belowskip=3pt,
     106        keepspaces=true,
     107        tabsize=4,
     108        % frame=lines,
     109        literate=,
     110        showlines=true,                                                          % show blank lines at end of code
     111        showspaces=false,
     112        showstringspaces=false,
     113        escapechar=\$,
     114        xleftmargin=\parindentlnth,                                  % indent code to paragraph indentation
     115        moredelim=[is][\color{red}\bfseries]{**R**}{**R**},    % red highlighting
     116        % moredelim=* detects keywords, comments, strings, and other delimiters and applies their formatting
     117        % moredelim=** allows cumulative application
    121118}
    122119
    123120\lstdefinestyle{defaultStyle}{
    124   escapeinside={@@},
    125   basicstyle=\linespread{0.9}\tt\footnotesize,          % reduce line spacing and use typewriter font
    126   keywordstyle=\bfseries\color{blue},
    127   keywordstyle=[2]\bfseries\color{Plum},
    128   commentstyle=\itshape\color{OliveGreen},                  % green and italic comments
    129   identifierstyle=\color{identifierCol},
    130   stringstyle=\sf\color{Mahogany},                                % use sanserif font
    131   mathescape=true,
    132   columns=fixed,
    133   aboveskip=4pt,                                  % spacing above/below code block
    134   belowskip=3pt,
    135   keepspaces=true,
    136   tabsize=4,
    137   % frame=lines,
    138   literate=,
    139   showlines=true,                                % show blank lines at end of code
    140   showspaces=false,
    141   showstringspaces=false,
    142   escapechar=\$,
    143   xleftmargin=\parindentlnth,                     % indent code to paragraph indentation
    144   moredelim=[is][\color{red}\bfseries]{**R**}{**R**},    % red highlighting
    145   % moredelim=* detects keywords, comments, strings, and other delimiters and applies their formatting
    146   % moredelim=** allows cumulative application
     121        escapeinside={@@},
     122        basicstyle=\linespread{0.9}\tt\footnotesize,            % reduce line spacing and use typewriter font
     123        keywordstyle=\bfseries\color{blue},
     124        keywordstyle=[2]\bfseries\color{Plum},
     125        commentstyle=\itshape\color{OliveGreen},                    % green and italic comments
     126        identifierstyle=\color{identifierCol},
     127        stringstyle=\sf\color{Mahogany},                                          % use sanserif font
     128        mathescape=true,
     129        columns=fixed,
     130        aboveskip=4pt,                                                            % spacing above/below code block
     131        belowskip=3pt,
     132        keepspaces=true,
     133        tabsize=4,
     134        % frame=lines,
     135        literate=,
     136        showlines=true,                                                          % show blank lines at end of code
     137        showspaces=false,
     138        showstringspaces=false,
     139        escapechar=\$,
     140        xleftmargin=\parindentlnth,                                  % indent code to paragraph indentation
     141        moredelim=[is][\color{red}\bfseries]{**R**}{**R**},    % red highlighting
     142        % moredelim=* detects keywords, comments, strings, and other delimiters and applies their formatting
     143        % moredelim=** allows cumulative application
    147144}
    148145
    149146\lstdefinestyle{cfaStyle}{
    150   escapeinside={@@},
    151   basicstyle=\linespread{0.9}\tt\footnotesize,          % reduce line spacing and use typewriter font
    152   keywordstyle=\bfseries\color{blue},
    153   keywordstyle=[2]\bfseries\color{Plum},
    154   commentstyle=\sf\itshape\color{OliveGreen},             % green and italic comments
    155   identifierstyle=\color{identifierCol},
    156   stringstyle=\sf\color{Mahogany},                                % use sanserif font
    157   mathescape=true,
    158   columns=fixed,
    159   aboveskip=4pt,                                  % spacing above/below code block
    160   belowskip=3pt,
    161   keepspaces=true,
    162   tabsize=4,
    163   % frame=lines,
    164   literate=,
    165   showlines=true,                                 % show blank lines at end of code
    166   showspaces=false,
    167   showstringspaces=false,
    168   escapechar=\$,
    169   xleftmargin=\parindentlnth,                     % indent code to paragraph indentation
    170   moredelim=[is][\color{red}\bfseries]{**R**}{**R**},    % red highlighting
    171   morekeywords=[2]{accept, signal, signal_block, wait, waitfor},
     147        escapeinside={@@},
     148        basicstyle=\linespread{0.9}\sf,         % reduce line spacing and use typewriter font
     149%  keywordstyle=\bfseries\color{blue},
     150        keywordstyle=[2]\bfseries\color{red},
     151%  commentstyle=\sf\itshape\color{OliveGreen},            % green and italic comments
     152        identifierstyle=\color{identifierCol},
     153%  stringstyle=\sf\color{Mahogany},                                       % use sanserif font
     154        stringstyle=\tt,                                                                                % use typewriter font
     155        mathescape=true,
     156        columns=fixed,
     157        aboveskip=4pt,                                                            % spacing above/below code block
     158        belowskip=3pt,
     159        keepspaces=true,
     160        tabsize=4,
     161        % frame=lines,
     162        literate=,
     163        showlines=true,                                                          % show blank lines at end of code
     164        showspaces=false,
     165        showstringspaces=false,
     166        escapechar=\$,
     167        xleftmargin=\parindentlnth,                                  % indent code to paragraph indentation
     168        moredelim=[is][\color{red}\bfseries]{**R**}{**R**},    % red highlighting
     169        morekeywords=[2]{accept, signal, signal_block, wait, waitfor},
    172170}
    173171
     
    175173
    176174\lstnewenvironment{ccode}[1][]{
    177   \lstset{
    178     language = C,
    179     style=defaultStyle,
    180     captionpos=b,
    181     #1
    182   }
     175        \lstset{
     176                language = C,
     177                style=defaultStyle,
     178                captionpos=b,
     179                #1
     180        }
    183181}{}
    184182
    185183\lstnewenvironment{cfacode}[1][]{
    186   \lstset{
    187     language = CFA,
    188     style=cfaStyle,
    189     captionpos=b,
    190     #1
    191   }
     184        \lstset{
     185                language = CFA,
     186                style=cfaStyle,
     187                captionpos=b,
     188                #1
     189        }
    192190}{}
    193191
    194192\lstnewenvironment{pseudo}[1][]{
    195   \lstset{
    196     language = pseudo,
    197     style=pseudoStyle,
    198     captionpos=b,
    199     #1
    200   }
     193        \lstset{
     194                language = pseudo,
     195                style=pseudoStyle,
     196                captionpos=b,
     197                #1
     198        }
    201199}{}
    202200
    203201\lstnewenvironment{cppcode}[1][]{
    204   \lstset{
    205     language = c++,
    206     style=defaultStyle,
    207     captionpos=b,
    208     #1
    209   }
     202        \lstset{
     203                language = c++,
     204                style=defaultStyle,
     205                captionpos=b,
     206                #1
     207        }
    210208}{}
    211209
    212210\lstnewenvironment{ucppcode}[1][]{
    213   \lstset{
    214     language = c++,
    215     style=defaultStyle,
    216     captionpos=b,
    217     #1
    218   }
     211        \lstset{
     212                language = c++,
     213                style=defaultStyle,
     214                captionpos=b,
     215                #1
     216        }
    219217}{}
    220218
    221219\lstnewenvironment{javacode}[1][]{
    222   \lstset{
    223     language = java,
    224     style=defaultStyle,
    225     captionpos=b,
    226     #1
    227   }
     220        \lstset{
     221                language = java,
     222                style=defaultStyle,
     223                captionpos=b,
     224                #1
     225        }
    228226}{}
    229227
    230228\lstnewenvironment{scalacode}[1][]{
    231   \lstset{
    232     language = scala,
    233     style=defaultStyle,
    234     captionpos=b,
    235     #1
    236   }
     229        \lstset{
     230                language = scala,
     231                style=defaultStyle,
     232                captionpos=b,
     233                #1
     234        }
    237235}{}
    238236
    239237\lstnewenvironment{smlcode}[1][]{
    240   \lstset{
    241     language = sml,
    242     style=defaultStyle,
    243     captionpos=b,
    244     #1
    245   }
     238        \lstset{
     239                language = sml,
     240                style=defaultStyle,
     241                captionpos=b,
     242                #1
     243        }
    246244}{}
    247245
    248246\lstnewenvironment{dcode}[1][]{
    249   \lstset{
    250     language = D,
    251     style=defaultStyle,
    252     captionpos=b,
    253     #1
    254   }
     247        \lstset{
     248                language = D,
     249                style=defaultStyle,
     250                captionpos=b,
     251                #1
     252        }
    255253}{}
    256254
    257255\lstnewenvironment{rustcode}[1][]{
    258   \lstset{
    259     language = rust,
    260     style=defaultStyle,
    261     captionpos=b,
    262     #1
    263   }
     256        \lstset{
     257                language = rust,
     258                style=defaultStyle,
     259                captionpos=b,
     260                #1
     261        }
    264262}{}
    265263
    266264\lstnewenvironment{gocode}[1][]{
    267   \lstset{
    268     language = Golang,
    269     style=defaultStyle,
    270     captionpos=b,
    271     #1
    272   }
     265        \lstset{
     266                language = Golang,
     267                style=defaultStyle,
     268                captionpos=b,
     269                #1
     270        }
    273271}{}
    274272
     
    278276\newcommand{\code}[1]{\lstinline[language=CFA,style=cfaStyle]{#1}}
    279277\newcommand{\pscode}[1]{\lstinline[language=pseudo,style=pseudoStyle]{#1}}
     278
     279% Local Variables: %
     280% tab-width: 4 %
     281% fill-column: 100 %
     282% End: %
Note: See TracChangeset for help on using the changeset viewer.