| Server IP : 104.21.25.180 / Your IP : 104.23.197.123 Web Server : Apache/2.4.37 System : Linux almalinux.duckdns.org 4.18.0-553.111.1.el8_10.x86_64 #1 SMP Sun Mar 8 20:06:07 EDT 2026 x86_64 User : ricodeal ( 1046) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/enscript/hl/ |
Upload File : |
/**
* Name: scheme
* Description: Scheme programming language.
* Author: Markku Rossi <[email protected]>
*/
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:
*/