/usr/share/enscript/hl/scheme.st is in enscript 1.6.5.90-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | /**
* Name: scheme
* Description: Scheme programming language.
* Author: Markku Rossi <mtr@iki.fi>
*/
state scheme extends HighlightEntry
{
BEGIN {
/*
* Modify regexp character syntax so that we can distinguish all
* scheme symbols.
*/
extras = list ('!', '$', '%', '&', '*', '/', ':', '<',
'=', '>', '?', '~', '^', '.', '+', '-');
for (i = 0; i < length (extras); i = i + 1)
regexp_syntax (extras[i], 'w');
}
/* Comments. */
/;/ {
comment_face (true);
language_print ($0);
call (eat_one_line);
comment_face (false);
}
/* String constants. */
/\"/ {
string_face (true);
language_print ($0);
call (c_string);
string_face (false);
}
/* Definitions. */
/(\([ \t]*)(define)([ \t]+\(?)([!\$%&\*\/:<=>\?~_^a-zA-Z][!\$%&\*\/:<=>\?~_^a-zA-Z0-9.+\-]*)/ {
/* Starting garbage. */
language_print ($1);
/* Keyword `define'. */
keyword_face (true);
language_print ($2);
keyword_face (false);
/* Middle garbage. */
language_print ($3);
/* Function name. */
function_name_face (true);
language_print ($4);
function_name_face (false);
}
/* ':'-names, Emacs highlights these, so do we. */
/([ \t])(:[!\$%&\*\/:<=>\?~_^a-zA-Z0-9.+\-]*)/ {
language_print ($1);
reference_face (true);
language_print ($2);
reference_face (false);
}
/* Keywords.
"=>" + "set!" +
(build-re '(else define unquote unquote-splicing quote lambda
if begin cond and or case let let* letrec do delay quasiquote))
*/
/=>|\bset!|\b(and|begin|c(ase|ond)|d(e(fine|lay)|o)|else|if\
|l(ambda|et(|\*|rec))|or|qu(asiquote|ote)|unquote(|-splicing))\b/ {
keyword_face (true);
language_print ($0);
keyword_face (false);
}
}
/*
Local variables:
mode: c
End:
*/
|