|
5 | 5 | \RequirePackage{xcolor} |
6 | 6 | \RequirePackage{xparse} |
7 | 7 |
|
8 | | -% EasyCrypt % |
9 | | -% Language |
| 8 | +% EasyCrypt % Language |
10 | 9 | \lstdefinelanguage{easycrypt}{% |
11 | 10 | sensitive=true, % Case sensitive keywords |
12 | | - % Keywords: Meta/Specification language |
| 11 | + % Keywords: Global |
13 | 12 | morekeywords=[1]% |
14 | 13 | { |
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 | + }, |
| 20 | + % Keywords: internal, and programming language |
| 21 | + morekeywords=[2]% |
| 22 | + { |
| 23 | + debug, fail, pragma, time, undo, async, ehoare, elif, else, equiv, exists, |
| 24 | + for, forall, fun, glob, hoare, if, in, is, islossless, let, match, phoare, |
| 25 | + proc, raise, res, return, then, var, while |
23 | 26 | }, |
24 | 27 | % Keywords: Regular (i.e., non-closing) tactics |
25 | 28 | morekeywords=[2]% |
26 | 29 | { |
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 |
| 30 | + algebra, alias, apply, auto, beta, byehoare, byequiv, byphoare, bypr, byupto, |
| 31 | + call, case, cbv, cfold, change, clear, congr, conseq, delta, eager, ecall, |
| 32 | + elim, eta, exfalso, exlim, fel, field, fieldeq, fission, fusion, gen, have, |
| 33 | + idassign, idtac, inline, interleave, iota, kill, left, logic, modpath, move, |
| 34 | + outline, pose, pr_bounded, progress, rcondf, rcondt, replace, rewrite, right, |
| 35 | + ring, ringeq, rnd, rndsem, rwnormal, seq, sim, simplify, skip, sp, split, |
| 36 | + splitwhile, subst, suff, swap, symmetry, transitivity, trivial, unroll, |
| 37 | + weakmem, wlog, wp, zeta |
37 | 38 | }, |
38 | | - % Keywords: Closing tactics/tacticals |
| 39 | + % Keywords: Closing/byclose tactics and dangerous commands |
39 | 40 | morekeywords=[3]% |
40 | 41 | { |
41 | | - abort, admit, admitted, assumption, by, check, done, |
42 | | - edit, exact, fix, reflexivity, smt, solve |
| 42 | + assumption, by, check, coq, done, edit, exact, fix, reflexivity, smt, solve |
43 | 43 | }, |
44 | | - % Keywords: Tacticals |
| 44 | + % Keywords: Tacticals and dangerous commands |
45 | 45 | morekeywords=[4]% |
46 | 46 | { |
47 | | - do, expect, first, last, strict, try |
| 47 | + do, expect, first, last, try, |
| 48 | + admit, admitted |
48 | 49 | }, |
49 | 50 | comment=[n]{(*}{*)}, % Multi-line, nested comments delimited by (* and *) |
50 | 51 | string=[d]{"}, % Strings delimited by " and ", non-escapable |
|
74 | 75 | } |
75 | 76 |
|
76 | 77 | % Define default colors based on availability of colorblind colors |
77 | | -\makeatletter |
78 | 78 | \@ifpackageloaded{colorblind}{ |
79 | 79 | \lstdefinestyle{easycrypt-default}{% |
80 | 80 | style=easycrypt-base, |
|
104 | 104 | numberstyle={\small\color{gray}}, |
105 | 105 | } |
106 | 106 | } |
107 | | -\makeatother |
108 | 107 |
|
109 | 108 | % Style for drafting/debugging (explicit spaces/tabs) |
110 | 109 | \lstdefinestyle{easycrypt-draft}{% |
|
0 commit comments