Skip to content

Commit 5a50911

Browse files
namasikanamstrub
authored andcommitted
Update to the latest keywords list and remove the letter environment.
1 parent aec384b commit 5a50911

1 file changed

Lines changed: 31 additions & 32 deletions

File tree

assets/latex/eclistings.sty

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,46 +5,44 @@
55
\RequirePackage{xcolor}
66
\RequirePackage{xparse}
77

8-
% EasyCrypt %
9-
% Language
8+
% EasyCrypt % Language
109
\lstdefinelanguage{easycrypt}{%
1110
sensitive=true, % Case sensitive keywords
12-
% Keywords: Meta/Specification language
11+
% Keywords: Global and programming language
1312
morekeywords=[1]%
1413
{
15-
abbrev, abstract, as, assert, async, axiom, axiomatized, class, clone,
16-
const, debug, declare, eager, ehoare, elif, else, end, equiv, exists, exit,
17-
export, fail, for, forall, from, fun, glob, global, goal, hint, hoare, if,
18-
import, in, include, inductive, instance, islossless, lemma, let, local, locate,
19-
match, module, nosmt, notation, of, op, phoare, pragma, Pr, pred, print, proc,
20-
proof, prover, qed, quantum, realize, remove, rename, require, res, return,
21-
search, section, Self, subtype, then, theory, time, timeout, Top, type,
22-
undo, var, while, why3, with
14+
Pr, Self, Top, abbrev, abort, abstract, as, axiom, axiomatized, clone, const,
15+
declare, dump, end, exception, exit, export, from, global, goal, hint, import,
16+
include, inductive, instance, lemma, local, locate, module, notation, of, op,
17+
pred, print, proof, prover, qed, realize, remove, rename, require, search,
18+
section, subtype, theory, timeout, type, why3, with,
19+
async, ehoare, elif, else, equiv, exists, for, forall, fun, glob, hoare, if,
20+
in, is, islossless, let, match, phoare, proc, raise, res, return, then, var,
21+
while
2322
},
2423
% Keywords: Regular (i.e., non-closing) tactics
2524
morekeywords=[2]%
2625
{
27-
algebra, alias, apply, async, auto, beta,
28-
byequiv, byphoare, bypr, call, case, cbv, cfold,
29-
change, clear, congr, conseq, cut, delta, dump,
30-
ecall, elim, eta, exfalso, exlim, fel, field, fieldeq, fission,
31-
fusion, gen, have, hoare, idtac, inline, interleave, iota, kill, left, logic,
32-
modpath, move, outline, pose, pr_bounded, progress, rcondf,
33-
rcondt, replace, rewrite, right, ring, ringeq, rnd, rndsem, rwnormal,
34-
seq, sim, simplify, skip, sp, split, splitwhile, subst,
35-
suff, swap, symmetry, transitivity, trivial, unroll, weakmem, wlog,
36-
wp, zeta
26+
algebra, alias, apply, auto, beta, byehoare, byequiv, byphoare, bypr, byupto,
27+
call, case, cbv, cfold, change, clear, congr, conseq, delta, eager, ecall,
28+
elim, eta, exfalso, exlim, fel, field, fieldeq, fission, fusion, gen, have,
29+
idassign, idtac, inline, interleave, iota, kill, left, logic, modpath, move,
30+
outline, pose, pr_bounded, progress, rcondf, rcondt, replace, rewrite, right,
31+
ring, ringeq, rnd, rndsem, rwnormal, seq, sim, simplify, skip, sp, split,
32+
splitwhile, subst, suff, swap, symmetry, transitivity, trivial, unroll,
33+
weakmem, wlog, wp, zeta
3734
},
38-
% Keywords: Closing tactics/tacticals
35+
% Keywords: Closing/byclose tactics and dangerous commands
3936
morekeywords=[3]%
4037
{
41-
abort, admit, admitted, assumption, by, check, done,
42-
edit, exact, fix, reflexivity, smt, solve
38+
admit, admitted,
39+
assumption, by, check, coq, done, edit, exact, fix, reflexivity, smt, solve
4340
},
44-
% Keywords: Tacticals
41+
% Keywords: Tacticals and internal
4542
morekeywords=[4]%
4643
{
47-
do, expect, first, last, strict, try
44+
do, expect, first, last, try,
45+
debug, fail, pragma, time, undo
4846
},
4947
comment=[n]{(*}{*)}, % Multi-line, nested comments delimited by (* and *)
5048
string=[d]{"}, % Strings delimited by " and ", non-escapable
@@ -74,7 +72,6 @@
7472
}
7573

7674
% Define default colors based on availability of colorblind colors
77-
\makeatletter
7875
\@ifpackageloaded{colorblind}{
7976
\lstdefinestyle{easycrypt-default}{%
8077
style=easycrypt-base,
@@ -104,7 +101,6 @@
104101
numberstyle={\small\color{gray}},
105102
}
106103
}
107-
\makeatother
108104

109105
% Style for drafting/debugging (explicit spaces/tabs)
110106
\lstdefinestyle{easycrypt-draft}{%
@@ -119,12 +115,15 @@
119115
style=easycrypt-default,
120116
frame=none,
121117
framesep=0pt,
118+
basicstyle={\small\ttfamily},
119+
aboveskip=0.3\baselineskip,
120+
belowskip=0.3\baselineskip,
121+
columns=fullflexible
122122
}
123123

124-
% Environments
125-
%% Default, non-floating environment
126-
%% Meant to be used inside other (potentially floating) environment
127-
%% that takes care of the caption and surrounding spacing
124+
% Environments % Default, non-floating environment % Meant to be used inside
125+
%other (potentially floating) environment % that takes care of the caption and
126+
%surrounding spacing
128127
\lstnewenvironment{eclst}[1][]{%
129128
\lstset{%
130129
language=easycrypt,%

0 commit comments

Comments
 (0)