HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/share/source-highlight/scheme.lang
comment delim "#\|" "\|#" multiline nested
comment start ";"

environment string delim "\"" "\"" begin
  specialchar = '\\.'
end

type = '#t|#f|#\\[[:alnum:]]+' nonsensitive

vardef words = '(define|define-syntax|syntax-case|syntax-rules|lambda|let|let\*|letrec|let-syntax|letrec-syntax|if|else|cond|case|and|not|or|begin|for-each|map|delay|do|dynamic-wind|call/cc|call-with-current-continuation|call-with-input-file|call-with-output-file)'

# Match keywords as long as they aren't just a prefix of an identifier
keyword = $words + '(?![[:alnum:]!$%&*+./:<=>?@^_~-])'

# Make any identifier that doen't start with a keyword be normal
normal = '(?!' + $words +')' + '[[:alpha:]!$%&*+./:<=>?@^_~-][[:alnum:]!$%&*+./:<=>?@^_~-]*'

# Highlight the named let expressions
(cbracket,keyword,normal,function) = `(\()(let)([[:blank:]]+)([[:alpha:]!$%&*+./:<=>?@^_~-][[:alnum:]!$%&*+./:<=>?@^_~-]*)`

# Highlight the names of defined forms
(cbracket,keyword,normal,function) = `(\()(define(?:-syntax)?)([[:blank:]]+)([[:alpha:]!$%&*+./:<=>?@^_~-][[:alnum:]!$%&*+./:<=>?@^_~-]*)`
(cbracket,keyword,normal,cbracket,function) = `(\()(define)([[:blank:]]+)(\()([[:alpha:]!$%&*+./:<=>?@^_~-][[:alnum:]!$%&*+./:<=>?@^_~-]*)`

number = '(\#(x|o|b|X|O|B))?[+-]?((0x[[:xdigit:]]+)|(([[:digit:]]*\.)?[[:digit:]]+([eE][+-]?[[:digit:]]+)?))'

cbracket = "(|)"