source: doc/LaTeXmacros/lstlang.sty @ 16c95e3

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsdeferred_resndemanglerenumforall-pointer-decayjacob/cs343-translationjenkins-sandboxnew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 16c95e3 was a029714, checked in by Thierry Delisle <tdelisle@…>, 7 years ago

Moved accept,signal,signal_block,wait out of lstlang.sty

  • Property mode set to 100644
File size: 5.1 KB
Line 
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -*- Mode: Latex -*- %%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%%
3%% Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
4%%
5%% lstlang.sty --
6%%
7%% Author           : Peter A. Buhr
8%% Created On       : Sat May 13 16:34:42 2017
9%% Last Modified By : Peter A. Buhr
10%% Last Modified On : Fri May 26 12:47:09 2017
11%% Update Count     : 8
12%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13
14% Go programming language: https://github.com/julienc91/listings-golang/blob/master/listings-golang.sty
15\lstdefinelanguage{Golang}{
16        morekeywords=[1]{package,import,func,type,struct,return,defer,panic,recover,select,var,const,iota,},
17        morekeywords=[2]{string,uint,uint8,uint16,uint32,uint64,int,int8,int16,int32,int64,
18                bool,float32,float64,complex64,complex128,byte,rune,uintptr, error,interface},
19        morekeywords=[3]{map,slice,make,new,nil,len,cap,copy,close,true,false,delete,append,real,imag,complex,chan,},
20        morekeywords=[4]{for,break,continue,range,goto,switch,case,fallthrough,if,else,default,},
21        morekeywords=[5]{Println,Printf,Error,},
22        sensitive=true,
23        morecomment=[l]{//},
24        morecomment=[s]{/*}{*/},
25        morestring=[b]',
26        morestring=[b]",
27        morestring=[s]{`}{`},
28}
29
30% from https://gist.github.com/nikolajquorning/92bbbeef32e1dd80105c9bf2daceb89a
31\lstdefinelanguage{sml} {
32        morekeywords= {
33                EQUAL, GREATER, LESS, NONE, SOME, abstraction, abstype, and, andalso, array, as, before, bool,
34                case, char, datatype, do, else, end, eqtype, exception, exn, false, fn, fun, functor, handle,
35                if, in, include, infix, infixr, int, let, list, local, nil, nonfix, not, o, of, op, open,
36                option, orelse, overload, print, raise, real, rec, ref, sharing, sig, signature, string, struct,
37                structure, substring, then, true, type, unit, val, vector, where, while, with, withtype, word
38        },
39        morestring=[b]",
40        morecomment=[s]{(*}{*)},
41}
42
43\lstdefinelanguage{D}{
44        % Keywords
45        morekeywords=[1]{
46                abstract, alias, align, auto, body, break, cast, catch, class, const, continue, debug,
47                delegate, delete, deprecated, do, else, enum, export, false, final, finally, for, foreach,
48                foreach_reverse, function, goto, if, immutable, import, in, inout, interface, invariant, is,
49                lazy, macro, mixin, module, new, nothrow, null, out, override, package, pragma, private,
50                protected, public, pure, ref, return, shared, static, struct, super, switch, synchronized,
51                template, this, throw, true, try, typedef, typeid, typeof, union, unittest, volatile, while,
52                with
53        },
54        % Special identifiers, common functions
55        morekeywords=[2]{enforce},
56        % Ugly identifiers
57        morekeywords=[3]{
58                __DATE__, __EOF__, __FILE__, __LINE__, __TIMESTAMP__, __TIME__, __VENDOR__,
59                __VERSION__, __ctfe, __gshared, __monitor, __thread, __vptr, _argptr,
60                _arguments, _ctor, _dtor
61        },
62        % Basic types
63        morekeywords=[4]{
64                byte, ubyte, short, ushort, int, uint, long, ulong, cent, ucent, void, bool, bit, float,
65                double, real, ushort, int, uint, long, ulong, float, char, wchar, dchar, string, wstring,
66                dstring, ireal, ifloat, idouble, creal, cfloat, cdouble, size_t, ptrdiff_t, sizediff_t,
67                equals_t, hash_t
68        },
69        % Strings
70        morestring=[b]{"},
71        morestring=[b]{'},
72        morestring=[b]{`},
73        % Comments
74        comment=[l]{//},
75        morecomment=[s]{/*}{*/},
76        morecomment=[s][\color{blue}]{/**}{*/},
77        morecomment=[n]{/+}{+/},
78        morecomment=[n][\color{blue}]{/++}{+/},
79        % Options
80        sensitive=true
81}
82
83\lstdefinelanguage{rust}{
84        morekeywords=[1]{
85                abstract, alignof, as, become, box, break, const, continue, crate, do, else, enum, extern,
86        false, final, fn, for, if, impl, in, let, loop, macro, match, mod, move, mut, offsetof,
87        override, priv, proc, pub, pure, ref, return, Self, self, sizeof, static, struct, super,
88        trait, true, type, typeof, unsafe, unsized, use, virtual, where, while, yield
89        },
90        morestring=[b]{"},
91        comment=[l]{//},
92        morecomment=[s]{/*}{*/},
93        sensitive=true
94}
95
96\lstdefinelanguage{Pseudo}{
97        morekeywords={string,uint,int,bool,float},
98        sensitive=true,
99        morecomment=[l]{//},
100        morecomment=[s]{/*}{*/},
101        morestring=[b]',
102        morestring=[b]",
103        morestring=[s]{`}{`},
104}
105
106% CFA programming language, based on ANSI C (with some gcc additions)
107\lstdefinelanguage{CFA}[ANSI]{C}{
108        morekeywords={
109                _Alignas, _Alignof, __alignof, __alignof__, asm, __asm, __asm__, _At, __attribute,
110                __attribute__, auto, _Bool, catch, catchResume, choose, _Complex, __complex, __complex__,
111                __const, __const__, disable, dtype, enable, __extension__, fallthrough, fallthru,
112                finally, forall, ftype, _Generic, _Imaginary, inline, __label__, lvalue, _Noreturn, one_t,
113                otype, restrict, _Static_assert, throw, throwResume, trait, try, ttype, typeof, __typeof,
114                __typeof__, zero_t},
115        morekeywords=[2]{
116                _Atomic, coroutine, is_coroutine, is_monitor, is_thread, monitor, mutex, nomutex,
117                resume, suspend, thread, _Thread_local, yield},
118}
119
120% uC++ programming language, based on ANSI C++
121\lstdefinelanguage{uC++}[ANSI]{C++}{
122        morekeywords={
123                _Accept, _AcceptReturn, _AcceptWait, _Actor, _At, _CatchResume, _Cormonitor, _Coroutine, _Disable,
124                _Else, _Enable, _Event, _Finally, _Monitor, _Mutex, _Nomutex, _PeriodicTask, _RealTimeTask,
125                _Resume, _Select, _SporadicTask, _Task, _Timeout, _When, _With, _Throw},
126}
127
128% Local Variables: %
129% tab-width: 4 %
130% fill-column: 100 %
131% End: %
Note: See TracBrowser for help on using the repository browser.