summaryrefslogtreecommitdiffstats
path: root/runtime/syntax
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-02-09 22:00:53 +0100
committerBram Moolenaar <Bram@vim.org>2018-02-09 22:00:53 +0100
commit7254067ee970686cc3ff4a1effc3e49e9192a5c1 (patch)
tree09d484d661772818ee7ad4f3cbe1558d8c900dd5 /runtime/syntax
parent5459129af2a832a027a1e7ca2d6177c26647d64f (diff)
Update runtime files.
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/chicken.vim77
-rw-r--r--runtime/syntax/config.vim10
-rw-r--r--runtime/syntax/cuda.vim6
-rw-r--r--runtime/syntax/debchangelog.vim8
-rw-r--r--runtime/syntax/debcontrol.vim61
-rw-r--r--runtime/syntax/debsources.vim6
-rw-r--r--runtime/syntax/scheme.vim744
7 files changed, 556 insertions, 356 deletions
diff --git a/runtime/syntax/chicken.vim b/runtime/syntax/chicken.vim
new file mode 100644
index 0000000000..f934d9d74e
--- /dev/null
+++ b/runtime/syntax/chicken.vim
@@ -0,0 +1,77 @@
+" Vim syntax file
+" Language: Scheme (CHICKEN)
+" Last Change: 2018 Jan 31
+" Author: Evan Hanson <evhan@foldling.org>
+" Maintainer: Evan Hanson <evhan@foldling.org>
+" URL: https://foldling.org/vim/syntax/chicken.vim
+" Notes: This is supplemental syntax, to be loaded after the core Scheme
+" syntax file (syntax/scheme.vim). Enable it by setting b:is_chicken=1
+" and filetype=scheme.
+
+" Only to be used on top of the Scheme syntax.
+if !exists('b:did_scheme_syntax')
+ finish
+endif
+
+" Lighten parentheses.
+hi def link schemeParentheses Comment
+
+" foo#bar
+syn match schemeExtraSyntax /[^ #'`\t\n()\[\]"|;]\+#[^ '`\t\n()\[\]"|;]\+/
+
+" ##foo#bar
+syn match schemeExtraSyntax /##[^ '`\t\n()\[\]"|;]\+/
+
+" Heredocs.
+syn region schemeString start=/#<[<#]\s*\z(.*\)/ end=/^\z1$/
+
+" Keywords.
+syn match schemeKeyword /#[!:][a-zA-Z0-9!$%&*+-./:<=>?@^_~#]\+/
+syn match schemeKeyword /[a-zA-Z0-9!$%&*+-./:<=>?@^_~#]\+:\>/
+
+" C/C++ syntax.
+let s:c = globpath(&rtp, 'syntax/cpp.vim', 0, 1)
+if len(s:c)
+ exe 'syn include @c ' s:c[0]
+ syn region c matchgroup=schemeComment start=/#>/ end=/<#/ contains=@c
+endif
+
+syn keyword schemeSyntax define-record
+
+syn keyword schemeLibrarySyntax declare
+syn keyword schemeLibrarySyntax module
+syn keyword schemeLibrarySyntax reexport
+syn keyword schemeLibrarySyntax require-library
+
+syn keyword schemeTypeSyntax -->
+syn keyword schemeTypeSyntax ->
+syn keyword schemeTypeSyntax :
+syn keyword schemeTypeSyntax assume
+syn keyword schemeTypeSyntax compiler-typecase
+syn keyword schemeTypeSyntax define-specialization
+syn keyword schemeTypeSyntax define-type
+syn keyword schemeTypeSyntax the
+
+syn keyword schemeExtraSyntax and-let*
+syn keyword schemeExtraSyntax match
+syn keyword schemeExtraSyntax match-lambda
+syn keyword schemeExtraSyntax match-lambda*
+
+syn keyword schemeSpecialSyntax define-compiler-syntax
+syn keyword schemeSpecialSyntax define-constant
+syn keyword schemeSpecialSyntax define-external
+syn keyword schemeSpecialSyntax define-inline
+syn keyword schemeSpecialSyntax foreign-code
+syn keyword schemeSpecialSyntax foreign-declare
+syn keyword schemeSpecialSyntax foreign-lambda
+syn keyword schemeSpecialSyntax foreign-lambda*
+syn keyword schemeSpecialSyntax foreign-primitive
+syn keyword schemeSpecialSyntax foreign-safe-lambda
+syn keyword schemeSpecialSyntax foreign-safe-lambda*
+syn keyword schemeSpecialSyntax foreign-value
+
+syn keyword schemeSyntaxSyntax begin-for-syntax
+syn keyword schemeSyntaxSyntax define-for-syntax
+syn keyword schemeSyntaxSyntax er-macro-transformer
+syn keyword schemeSyntaxSyntax ir-macro-transformer
+syn keyword schemeSyntaxSyntax require-library-for-syntax
diff --git a/runtime/syntax/config.vim b/runtime/syntax/config.vim
index c6d4e6b363..3636ed4130 100644
--- a/runtime/syntax/config.vim
+++ b/runtime/syntax/config.vim
@@ -1,9 +1,10 @@
" Vim syntax file
" Language: configure.in script: M4 with sh
-" Maintainer: Christian Hammesr <ch@lathspell.westend.com>
-" Last Change: 2015 Jan 14
+" Former Maintainer: Christian Hammesr <ch@lathspell.westend.com>
+" Last Change: 2018 Feb 03
" (patch from Yngve Inntjore Levinsen to detect AC_MSG)
" (patch from Khym Chanur to add @Spell)
+" (patch from James McCoy to fix paren matching)
" Well, I actually even do not know much about m4. This explains why there
" is probably very much missing here, yet !
@@ -30,8 +31,8 @@ syn keyword configspecial cat rm eval
syn region configstring start=+\z(["'`]\)+ skip=+\\\z1+ end=+\z1+ contains=@Spell
" Anything inside AC_MSG_TYPE([...]) and AC_MSG_TYPE(...) is a string.
-syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell
-syn region configstring matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell
+syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze(\[" matchgroup=configdelimiter end="\])" contains=configdelimiter,@Spell
+syn region configmsg matchgroup=configfunction start="AC_MSG_[A-Z]*\ze([^[]" matchgroup=configdelimiter end=")" contains=configdelimiter,@Spell
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
@@ -45,6 +46,7 @@ hi def link confignumber Number
hi def link configkeyword Keyword
hi def link configspecial Special
hi def link configstring String
+hi def link configmsg String
let b:current_syntax = "config"
diff --git a/runtime/syntax/cuda.vim b/runtime/syntax/cuda.vim
index cfc70b9ea8..13d70e343a 100644
--- a/runtime/syntax/cuda.vim
+++ b/runtime/syntax/cuda.vim
@@ -1,15 +1,15 @@
" Vim syntax file
" Language: CUDA (NVIDIA Compute Unified Device Architecture)
" Maintainer: Timothy B. Terriberry <tterribe@users.sourceforge.net>
-" Last Change: 2007 Oct 13
+" Last Change: 2018 Feb 06
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
-" Read the C syntax to start with
-runtime! syntax/c.vim
+" Read the C++ syntax to start with
+runtime! syntax/cpp.vim
" CUDA extentions
syn keyword cudaStorageClass __device__ __global__ __host__
diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim
index 6e6ed1951a..e79fc9a31b 100644
--- a/runtime/syntax/debchangelog.vim
+++ b/runtime/syntax/debchangelog.vim
@@ -1,10 +1,10 @@
" Vim syntax file
" Language: Debian changelog files
-" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
+" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
-" Last Change: 2017 Apr 23
-" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debchangelog.vim
+" Last Change: 2018 Jan 06
+" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
" Standard syntax initialization
if exists("b:current_syntax")
@@ -21,7 +21,7 @@ let s:binNMU='binary-only=yes'
syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ "
exe 'syn match debchangelogFirstKV contained "; \('.s:urgency.'\|'.s:binNMU.'\)"'
exe 'syn match debchangelogOtherKV contained ", \('.s:urgency.'\|'.s:binNMU.'\)"'
-syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|%(wheezy|jessie)%(-backports%(-sloppy)=|-security)=|stretch%(-backports|-security)=|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty|artful)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
+syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|%(wheezy|jessie)%(-backports%(-sloppy)=|-security)=|stretch%(-backports|-security)=|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty|artful|bionic)%(-%(security|proposed|updates|backports|commercial|partner))=)+"
syn match debchangelogVersion contained "(.\{-})"
syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*"
syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*"
diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim
index b8790747aa..945812f25c 100644
--- a/runtime/syntax/debcontrol.vim
+++ b/runtime/syntax/debcontrol.vim
@@ -1,10 +1,10 @@
" Vim syntax file
" Language: Debian control files
-" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
+" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
-" Last Change: 2017 Nov 04
-" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debcontrol.vim
+" Last Change: 2018 Jan 06
+" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debcontrol.vim
" Standard syntax initialization
if exists("b:current_syntax")
@@ -52,7 +52,7 @@ let s:sections = [
\, 'devel', 'doc', 'editors', 'education', 'electronics', 'embedded'
\, 'fonts', 'games', 'gnome', 'gnustep', 'gnu-r', 'golang', 'graphics'
\, 'hamradio', 'haskell', 'httpd', 'interpreters', 'introspection'
- \, 'java', 'javascript', 'kde', 'kernel', 'libs', 'libdevel', 'lisp'
+ \, 'java\%(script\)\=', 'kde', 'kernel', 'libs', 'libdevel', 'lisp'
\, 'localization', 'mail', 'math', 'metapackages', 'misc', 'net'
\, 'news', 'ocaml', 'oldlibs', 'otherosfs', 'perl', 'php', 'python'
\, 'ruby', 'rust', 'science', 'shells', 'sound', 'text', 'tex'
@@ -87,44 +87,29 @@ syn match debcontrolComment "^#.*$" contains=@Spell
syn case ignore
-" List of all legal keys, in order, from deb-src-control(5)
-" Source fields
-syn match debcontrolKey contained "^\%(Source\|Maintainer\|Uploaders\|Standards-Version\|Description\|Homepage\|Bugs\|Rules-Requires-Root\): *"
-syn match debcontrolKey contained "^\%(XS-\)\=Vcs-\%(Arch\|Bzr\|Cvs\|Darcs\|Git\|Hg\|Mtn\|Svn\|Browser\): *"
-syn match debcontrolKey contained "^\%(Origin\|Section\|Priority\): *"
-syn match debcontrolKey contained "^Build-\%(Depends\|Conflicts\)\%(-Arch\|-Indep\)\=: *"
-
-" Binary fields
-syn match debcontrolKey contained "^\%(Package\%(-Type\)\=\|Architecture\|Build-Profiles\): *"
-syn match debcontrolKey contained "^\%(\%(Build-\)\=Essential\|Multi-Arch\|Tag\): *"
-syn match debcontrolKey contained "^\%(\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\): *"
-syn match debcontrolKey contained "^\%(Subarchitecture\|Kernel-Version\|Installer-Menu-Item\): *"
-
-" User-defined fields
-syn match debcontrolKey contained "^X[SBC]\{0,3\}\%(-Private\)\=-[-a-zA-Z0-9]\+: *"
-
-syn match debcontrolDeprecatedKey contained "^\%(\%(XS-\)\=DM-Upload-Allowed\): *"
+" Handle all fields from deb-src-control(5)
" Fields for which we do strict syntax checking
-syn region debcontrolStrictField start="^Architecture" end="$" contains=debcontrolKey,debcontrolArchitecture,debcontrolSpace oneline
-syn region debcontrolStrictField start="^Multi-Arch" end="$" contains=debcontrolKey,debcontrolMultiArch oneline
-syn region debcontrolStrictField start="^\%(Package\|Source\)" end="$" contains=debcontrolKey,debcontrolName oneline
-syn region debcontrolStrictField start="^Priority" end="$" contains=debcontrolKey,debcontrolPriority oneline
-syn region debcontrolStrictField start="^Section" end="$" contains=debcontrolKey,debcontrolSection oneline
-syn region debcontrolStrictField start="^\%(XC-\)\=Package-Type" end="$" contains=debcontrolKey,debcontrolPackageType oneline
-syn region debcontrolStrictField start="^Homepage" end="$" contains=debcontrolKey,debcontrolHTTPUrl oneline keepend
-syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-\%(Browser\|Arch\|Bzr\|Darcs\|Hg\)" end="$" contains=debcontrolKey,debcontrolHTTPUrl oneline keepend
-syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Svn" end="$" contains=debcontrolKey,debcontrolVcsSvn,debcontrolHTTPUrl oneline keepend
-syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Cvs" end="$" contains=debcontrolKey,debcontrolVcsCvs oneline keepend
-syn region debcontrolStrictField start="^\%(XS-\)\=Vcs-Git" end="$" contains=debcontrolKey,debcontrolVcsGit oneline keepend
-syn region debcontrolStrictField start="^\%(XS-\)\=DM-Upload-Allowed" end="$" contains=debcontrolDeprecatedKey,debcontrolDmUpload oneline
-syn region debcontrolStrictField start="^Rules-Requires-Root" end="$" contains=debcontrolKey,debcontrolR3 oneline
-syn region debcontrolStrictField start="^\%(Build-\)\=Essential" end="$" contains=debcontrolKey,debcontrolYesNo oneline
+syn region debcontrolStrictField matchgroup=debcontrolKey start="^Architecture: *" end="$" contains=debcontrolArchitecture,debcontrolSpace oneline
+syn region debcontrolStrictField matchgroup=debcontrolKey start="^Multi-Arch: *" end="$" contains=debcontrolMultiArch oneline
+syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(Package\|Source\): *" end="$" contains=debcontrolName oneline
+syn region debcontrolStrictField matchgroup=debcontrolKey start="^Priority: *" end="$" contains=debcontrolPriority oneline
+syn region debcontrolStrictField matchgroup=debcontrolKey start="^Section: *" end="$" contains=debcontrolSection oneline
+syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XC-\)\=Package-Type: *" end="$" contains=debcontrolPackageType oneline
+syn region debcontrolStrictField matchgroup=debcontrolKey start="^Homepage: *" end="$" contains=debcontrolHTTPUrl oneline keepend
+syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-\)\=Vcs-\%(Browser\|Arch\|Bzr\|Darcs\|Hg\): *" end="$" contains=debcontrolHTTPUrl oneline keepend
+syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-\)\=Vcs-Svn: *" end="$" contains=debcontrolVcsSvn,debcontrolHTTPUrl oneline keepend
+syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-\)\=Vcs-Cvs: *" end="$" contains=debcontrolVcsCvs oneline keepend
+syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(XS-\)\=Vcs-Git: *" end="$" contains=debcontrolVcsGit oneline keepend
+syn region debcontrolStrictField matchgroup=debcontrolKey start="^Rules-Requires-Root: *" end="$" contains=debcontrolR3 oneline
+syn region debcontrolStrictField matchgroup=debcontrolKey start="^\%(Build-\)\=Essential: *" end="$" contains=debcontrolYesNo oneline
+
+syn region debcontrolStrictField matchgroup=debcontrolDeprecatedKey start="^\%(XS-\)\=DM-Upload-Allowed: *" end="$" contains=debcontrolDmUpload oneline
" Catch-all for the other legal fields
-syn region debcontrolField start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\|\%(XS-\)\=Testsuite\|Build-Profiles\|Tag\|Subarchitecture\|Kernel-Version\|Installer-Menu-Item\):" end="$" contains=debcontrolKey,debcontrolVariable,debcontrolEmail oneline
-syn region debcontrolMultiField start="^\%(Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\|Uploaders\|X[SBC]\{0,3\}\%(Private-\)\=-[-a-zA-Z0-9]\+\):" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment
-syn region debcontrolMultiFieldSpell start="^\%(Description\):" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolKey,debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell
+syn region debcontrolField matchgroup=debcontrolKey start="^\%(\%(XSBC-Original-\)\=Maintainer\|Standards-Version\|Bugs\|Origin\|X[SB]-Python-Version\|\%(XS-\)\=Vcs-Mtn\|\%(XS-\)\=Testsuite\%(-Triggers\)\=\|Build-Profiles\|Tag\|Subarchitecture\|Kernel-Version\|Installer-Menu-Item\): " end="$" contains=debcontrolVariable,debcontrolEmail oneline
+syn region debcontrolMultiField matchgroup=debcontrolKey start="^\%(Build-\%(Conflicts\|Depends\)\%(-Arch\|-Indep\)\=\|\%(Pre-\)\=Depends\|Recommends\|Suggests\|Breaks\|Enhances\|Replaces\|Conflicts\|Provides\|Built-Using\|Uploaders\|X[SBC]\{0,3\}\%(Private-\)\=-[-a-zA-Z0-9]\+\): *" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolEmail,debcontrolVariable,debcontrolComment
+syn region debcontrolMultiFieldSpell matchgroup=debcontrolKey start="^Description: *" skip="^[ \t]" end="^$"me=s-1 end="^[^ \t#]"me=s-1 contains=debcontrolEmail,debcontrolVariable,debcontrolComment,@Spell
" Associate our matches and regions with pretty colours
hi def link debcontrolKey Keyword
diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim
index 6791ece294..4e136fa9e3 100644
--- a/runtime/syntax/debsources.vim
+++ b/runtime/syntax/debsources.vim
@@ -1,9 +1,9 @@
" Vim syntax file
" Language: Debian sources.list
-" Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
+" Maintainer: Debian Vim Maintainers
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
-" Last Change: 2017 Oct 28
-" URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim
+" Last Change: 2018 Jan 06
+" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
" Standard syntax initialization
if exists("b:current_syntax")
diff --git a/runtime/syntax/scheme.vim b/runtime/syntax/scheme.vim
index af9a659e07..e209729f57 100644
--- a/runtime/syntax/scheme.vim
+++ b/runtime/syntax/scheme.vim
@@ -1,328 +1,464 @@
" Vim syntax file
-" Language: Scheme (R5RS + some R6RS extras)
-" Last Change: 2016 May 23
-" Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
-" Original author: Dirk van Deun <dirk@igwe.vub.ac.be>
-
-" This script incorrectly recognizes some junk input as numerals:
-" parsing the complete system of Scheme numerals using the pattern
-" language is practically impossible: I did a lax approximation.
-
-" MzScheme extensions can be activated with setting is_mzscheme variable
-
-" Suggestions and bug reports are solicited by the author.
-
-" Initializing:
-
-" quit when a syntax file was already loaded
-if exists("b:current_syntax")
+" Language: Scheme (R7RS)
+" Last Change: 2018-01-06
+" Author: Evan Hanson <evhan@foldling.org>
+" Maintainer: Evan Hanson <evhan@foldling.org>
+" Previous Author: Dirk van Deun <dirk@igwe.vub.ac.be>
+" Previous Maintainer: Sergey Khorev <sergey.khorev@gmail.com>
+" URL: https://foldling.org/vim/syntax/scheme.vim
+
+if exists('b:current_syntax')
finish
endif
-let s:cpo_save = &cpo
+let s:cpo = &cpo
set cpo&vim
-syn case ignore
-
-" Fascist highlighting: everything that doesn't fit the rules is an error...
-
-syn match schemeError ![^ \t()\[\]";]*!
-syn match schemeError ")"
-
-" Quoted and backquoted stuff
-
-syn region schemeQuoted matchgroup=Delimiter start="['`]" end=![ \t()\[\]";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
-
-syn region schemeQuoted matchgroup=Delimiter start="['`](" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
-syn region schemeQuoted matchgroup=Delimiter start="['`]#(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
-
-syn region schemeStrucRestricted matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
-syn region schemeStrucRestricted matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
-
-" Popular Scheme extension:
-" using [] as well as ()
-syn region schemeStrucRestricted matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
-syn region schemeStrucRestricted matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
-
-syn region schemeUnquote matchgroup=Delimiter start="," end=![ \t\[\]()";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
-syn region schemeUnquote matchgroup=Delimiter start=",@" end=![ \t\[\]()";]!me=e-1 contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
-
-syn region schemeUnquote matchgroup=Delimiter start=",(" end=")" contains=ALL
-syn region schemeUnquote matchgroup=Delimiter start=",@(" end=")" contains=ALL
-
-syn region schemeUnquote matchgroup=Delimiter start=",#(" end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
-syn region schemeUnquote matchgroup=Delimiter start=",@#(" end=")" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
-
-syn region schemeUnquote matchgroup=Delimiter start=",\[" end="\]" contains=ALL
-syn region schemeUnquote matchgroup=Delimiter start=",@\[" end="\]" contains=ALL
-
-syn region schemeUnquote matchgroup=Delimiter start=",#\[" end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
-syn region schemeUnquote matchgroup=Delimiter start=",@#\[" end="\]" contains=ALLBUT,schemeStruc,schemeSyntax,schemeFunc
-
-" R5RS Scheme Functions and Syntax:
-
-setlocal iskeyword=33,35-39,42-58,60-90,94,95,97-122,126,_
-
-syn keyword schemeSyntax lambda and or if cond case define let let* letrec
-syn keyword schemeSyntax begin do delay set! else =>
-syn keyword schemeSyntax quote quasiquote unquote unquote-splicing
-syn keyword schemeSyntax define-syntax let-syntax letrec-syntax syntax-rules
-" R6RS
-syn keyword schemeSyntax define-record-type fields protocol
-
-syn keyword schemeFunc not boolean? eq? eqv? equal? pair? cons car cdr set-car!
-syn keyword schemeFunc set-cdr! caar cadr cdar cddr caaar caadr cadar caddr
-syn keyword schemeFunc cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr
-syn keyword schemeFunc cadaar cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr
-syn keyword schemeFunc cddaar cddadr cdddar cddddr null? list? list length
-syn keyword schemeFunc append reverse list-ref memq memv member assq assv assoc
-syn keyword schemeFunc symbol? symbol->string string->symbol number? complex?
-syn keyword schemeFunc real? rational? integer? exact? inexact? = < > <= >=
-syn keyword schemeFunc zero? positive? negative? odd? even? max min + * - / abs
-syn keyword schemeFunc quotient remainder modulo gcd lcm numerator denominator
-syn keyword schemeFunc floor ceiling truncate round rationalize exp log sin cos
-syn keyword schemeFunc tan asin acos atan sqrt expt make-rectangular make-polar
-syn keyword schemeFunc real-part imag-part magnitude angle exact->inexact
-syn keyword schemeFunc inexact->exact number->string string->number char=?
-syn keyword schemeFunc char-ci=? char<? char-ci<? char>? char-ci>? char<=?
-syn keyword schemeFunc char-ci<=? char>=? char-ci>=? char-alphabetic? char?
-syn keyword schemeFunc char-numeric? char-whitespace? char-upper-case?
-syn keyword schemeFunc char-lower-case?
-syn keyword schemeFunc char->integer integer->char char-upcase char-downcase
-syn keyword schemeFunc string? make-string string string-length string-ref
-syn keyword schemeFunc string-set! string=? string-ci=? string<? string-ci<?
-syn keyword schemeFunc string>? string-ci>? string<=? string-ci<=? string>=?
-syn keyword schemeFunc string-ci>=? substring string-append vector? make-vector
-syn keyword schemeFunc vector vector-length vector-ref vector-set! procedure?
-syn keyword schemeFunc apply map for-each call-with-current-continuation
-syn keyword schemeFunc call-with-input-file call-with-output-file input-port?
-syn keyword schemeFunc output-port? current-input-port current-output-port
-syn keyword schemeFunc open-input-file open-output-file close-input-port
-syn keyword schemeFunc close-output-port eof-object? read read-char peek-char
-syn keyword schemeFunc write display newline write-char call/cc
-syn keyword schemeFunc list-tail string->list list->string string-copy
-syn keyword schemeFunc string-fill! vector->list list->vector vector-fill!
-syn keyword schemeFunc force with-input-from-file with-output-to-file
-syn keyword schemeFunc char-ready? load transcript-on transcript-off eval
-syn keyword schemeFunc dynamic-wind port? values call-with-values
-syn keyword schemeFunc scheme-report-environment null-environment
-syn keyword schemeFunc interaction-environment
-" R6RS
-syn keyword schemeFunc make-eq-hashtable make-eqv-hashtable make-hashtable
-syn keyword schemeFunc hashtable? hashtable-size hashtable-ref hashtable-set!
-syn keyword schemeFunc hashtable-delete! hashtable-contains? hashtable-update!
-syn keyword schemeFunc hashtable-copy hashtable-clear! hashtable-keys
-syn keyword schemeFunc hashtable-entries hashtable-equivalence-function hashtable-hash-function
-syn keyword schemeFunc hashtable-mutable? equal-hash string-hash string-ci-hash symbol-hash
-syn keyword schemeFunc find for-all exists filter partition fold-left fold-right
-syn keyword schemeFunc remp remove remv remq memp assp cons*
-
-" ... so that a single + or -, inside a quoted context, would not be
-" interpreted as a number (outside such contexts, it's a schemeFunc)
-
-syn match schemeDelimiter !\.[ \t\[\]()";]!me=e-1
-syn match schemeDelimiter !\.$!
-" ... and a single dot is not a number but a delimiter
-
-" This keeps all other stuff unhighlighted, except *stuff* and <stuff>:
-
-syn match schemeOther ,[a-z!$%&*/:<=>?^_~+@#%-][-a-z!$%&*/:<=>?^_~0-9+.@#%]*,
-syn match schemeError ,[a-z!$%&*/:<=>?^_~+@#%-][-a-z!$%&*/:<=>?^_~0-9+.@#%]*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*,
-
-syn match schemeOther "\.\.\."
-syn match schemeError !\.\.\.[^ \t\[\]()";]\+!
-" ... a special identifier
-
-syn match schemeConstant ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]\+\*[ \t\[\]()";],me=e-1
-syn match schemeConstant ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]\+\*$,
-syn match schemeError ,\*[-a-z!$%&*/:<=>?^_~0-9+.@]*\*[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*,
+syn match schemeParentheses "[^ '`\t\n()\[\]";]\+"
+syn match schemeParentheses "[)\]]"
-syn match schemeConstant ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[ \t\[\]()";],me=e-1
-syn match schemeConstant ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>$,
-syn match schemeError ,<[-a-z!$%&*/:<=>?^_~0-9+.@]*>[^-a-z!$%&*/:<=>?^_~0-9+.@ \t\[\]()";]\+[^ \t\[\]()";]*,
+syn match schemeIdentifier /[^ '`\t\n()\[\]"|;][^ '`\t\n()\[\]"|;]*/
-" Non-quoted lists, and strings:
+syn region schemeQuote matchgroup=schemeData start=/'[`']*/ end=/[ \t\n()\[\]";]/me=e-1
+syn region schemeQuote matchgroup=schemeData start=/'['`]*"/ skip=/\\[\\"]/ end=/"/
+syn region schemeQuote matchgroup=schemeData start=/'['`]*|/ skip=/\\[\\|]/ end=/|/
+syn region schemeQuote matchgroup=schemeData start=/'['`]*#\?(/ end=/)/ contains=ALLBUT,schemeQuasiquote,schemeQuasiquoteForm,schemeUnquote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster
-syn region schemeStruc matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=ALL
-syn region schemeStruc matchgroup=Delimiter start="#(" matchgroup=Delimiter end=")" contains=ALL
+syn region schemeQuasiquote matchgroup=schemeData start=/`['`]*/ end=/[ \t\n()\[\]";]/me=e-1
+syn region schemeQuasiquote matchgroup=schemeData start=/`['`]*#\?(/ end=/)/ contains=ALLBUT,schemeQuote,schemeQuoteForm,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster
-syn region schemeStruc matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=ALL
-syn region schemeStruc matchgroup=Delimiter start="#\[" matchgroup=Delimiter end="\]" contains=ALL
+syn region schemeUnquote matchgroup=schemeParentheses start=/,/ end=/[ `'\t\n\[\]()";]/me=e-1 contained contains=ALLBUT,schemeDatumCommentForm,@schemeImportCluster
+syn region schemeUnquote matchgroup=schemeParentheses start=/,@/ end=/[ `'\t\n\[\]()";]/me=e-1 contained contains=ALLBUT,schemeDatumCommentForm,@schemeImportCluster
+syn region schemeUnquote matchgroup=schemeParentheses start=/,(/ end=/)/ contained contains=ALLBUT,schemeDatumCommentForm,@schemeImportCluster
+syn region schemeUnquote matchgroup=schemeParentheses start=/,@(/ end=/)/ contained contains=ALLBUT,schemeDatumCommentForm,@schemeImportCluster
-" Simple literals:
-syn region schemeString start=+\%(\\\)\@<!"+ skip=+\\[\\"]+ end=+"+ contains=@Spell
+syn region schemeQuoteForm matchgroup=schemeData start=/(/ end=/)/ contained contains=ALLBUT,schemeQuasiquote,schemeQuasiquoteForm,schemeUnquote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster
+syn region schemeQuasiquoteForm matchgroup=schemeData start=/(/ end=/)/ contained contains=ALLBUT,schemeQuote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster
-" Comments:
+syn region schemeString start=/\(\\\)\@<!"/ skip=/\\[\\"]/ end=/"/
+syn region schemeSymbol start=/\(\\\)\@<!|/ skip=/\\[\\|]/ end=/|/
-syn match schemeComment ";.*$" contains=@Spell
+syn match schemeNumber /\(#[dbeio]\)*[+\-]*\([0-9]\+\|inf.0\|nan.0\)\(\/\|\.\)\?[0-9+\-@\ilns]*\>/
+syn match schemeNumber /#x[+\-]*[0-9a-fA-F]\+\>/
+syn match schemeBoolean /#t\(rue\)\?/
+syn match schemeBoolean /#f\(alse\)\?/
-" Writing out the complete description of Scheme numerals without
-" using variables is a day's work for a trained secretary...
+syn match schemeCharacter /#\\.[^ `'\t\n\[\]()]*/
+syn match schemeCharacter /#\\x[0-9a-fA-F]\+/
-syn match schemeOther ![+-][ \t\[\]()";]!me=e-1
-syn match schemeOther ![+-]$!
-"
-" This is a useful lax approximation:
-syn match schemeNumber "[-#+.]\=[0-9][-#+/0-9a-f@i.boxesfdl]*"
-syn match schemeError ![-#+0-9.][-#+/0-9a-f@i.boxesfdl]*[^-#+/0-9a-f@i.boxesfdl \t\[\]()";][^ \t\[\]()";]*!
+syn match schemeComment /;.*$/
-syn match schemeBoolean "#[tf]"
-syn match schemeError !#[tf][^ \t\[\]()";]\+!
+syn region schemeMultilineComment start=/#|/ end=/|#/ contains=schemeMultilineComment
-syn match schemeCharacter "#\\"
-syn match schemeCharacter "#\\."
-syn match schemeError !#\\.[^ \t\[\]()";]\+!
-syn match schemeCharacter "#\\space"
-syn match schemeError !#\\space[^ \t\[\]()";]\+!
-syn match schemeCharacter "#\\newline"
-syn match schemeError !#\\newline[^ \t\[\]()";]\+!
+syn region schemeForm matchgroup=schemeParentheses start="(" end=")" contains=ALLBUT,schemeUnquote,schemeDatumCommentForm,@schemeImportCluster
+syn region schemeForm matchgroup=schemeParentheses start="\[" end="\]" contains=ALLBUT,schemeUnquote,schemeDatumCommentForm,@schemeImportCluster
-" R6RS
-syn match schemeCharacter "#\\x[0-9a-fA-F]\+"
+syn region schemeVector matchgroup=schemeData start="#(" end=")" contains=ALLBUT,schemeQuasiquote,schemeQuasiquoteForm,schemeUnquote,schemeForm,schemeDatumCommentForm,schemeImport,@schemeImportCluster,@schemeSyntaxCluster
+syn region schemeVector matchgroup=schemeData start="#[fsu]\d\+(" end=")" contains=schemeNumber,schemeComment,schemeDatumComment
-
-if exists("b:is_mzscheme") || exists("is_mzscheme")
- " MzScheme extensions
- " multiline comment
- syn region schemeComment start="#|" end="|#" contains=@Spell
-
- " #%xxx are the special MzScheme identifiers
- syn match schemeOther "#%[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+"
- " anything limited by |'s is identifier
- syn match schemeOther "|[^|]\+|"
-
- syn match schemeCharacter "#\\\%(return\|tab\)"
-
- " Modules require stmt
- syn keyword schemeExtSyntax module require dynamic-require lib prefix all-except prefix-all-except rename
- " modules provide stmt
- syn keyword schemeExtSyntax provide struct all-from all-from-except all-defined all-defined-except
- " Other from MzScheme
- syn keyword schemeExtSyntax with-handlers when unless instantiate define-struct case-lambda syntax-case
- syn keyword schemeExtSyntax free-identifier=? bound-identifier=? module-identifier=? syntax-object->datum
- syn keyword schemeExtSyntax datum->syntax-object
- syn keyword schemeExtSyntax let-values let*-values letrec-values set!-values fluid-let parameterize begin0
- syn keyword schemeExtSyntax error raise opt-lambda define-values unit unit/sig define-signature
- syn keyword schemeExtSyntax invoke-unit/sig define-values/invoke-unit/sig compound-unit/sig import export
- syn keyword schemeExtSyntax link syntax quasisyntax unsyntax with-syntax
-
- syn keyword schemeExtFunc format system-type current-extension-compiler current-extension-linker
- syn keyword schemeExtFunc use-standard-linker use-standard-compiler
- syn keyword schemeExtFunc find-executable-path append-object-suffix append-extension-suffix
- syn keyword schemeExtFunc current-library-collection-paths current-extension-compiler-flags make-parameter
- syn keyword schemeExtFunc current-directory build-path normalize-path current-extension-linker-flags
- syn keyword schemeExtFunc file-exists? directory-exists? delete-directory/files delete-directory delete-file
- syn keyword schemeExtFunc system compile-file system-library-subpath getenv putenv current-standard-link-libraries
- syn keyword schemeExtFunc remove* file-size find-files fold-files directory-list shell-execute split-path
- syn keyword schemeExtFunc current-error-port process/ports process printf fprintf open-input-string open-output-string
- syn keyword schemeExtFunc get-output-string
- " exceptions
- syn keyword schemeExtFunc exn exn:application:arity exn:application:continuation exn:application:fprintf:mismatch
- syn keyword schemeExtFunc exn:application:mismatch exn:application:type exn:application:mismatch exn:break exn:i/o:filesystem exn:i/o:port
- syn keyword schemeExtFunc exn:i/o:port:closed exn:i/o:tcp exn:i/o:udp exn:misc exn:misc:application exn:misc:unsupported exn:module exn:read
- syn keyword schemeExtFunc exn:read:non-char exn:special-comment exn:syntax exn:thread exn:user exn:variable exn:application:mismatch
- syn keyword schemeExtFunc exn? exn:application:arity? exn:application:continuation? exn:application:fprintf:mismatch? exn:application:mismatch?
- syn keyword schemeExtFunc exn:application:type? exn:application:mismatch? exn:break? exn:i/o:filesystem? exn:i/o:port? exn:i/o:port:closed?
- syn keyword schemeExtFunc exn:i/o:tcp? exn:i/o:udp? exn:misc? exn:misc:application? exn:misc:unsupported? exn:module? exn:read? exn:read:non-char?
- syn keyword schemeExtFunc exn:special-comment? exn:syntax? exn:thread? exn:user? exn:variable? exn:application:mismatch?
- " Command-line parsing
- syn keyword schemeExtFunc command-line current-command-line-arguments once-any help-labels multi once-each
-
- " syntax quoting, unquoting and quasiquotation
- syn region schemeUnquote matchgroup=Delimiter start="#," end=![ \t\[\]()";]!me=e-1 contains=ALL
- syn region schemeUnquote matchgroup=Delimiter start="#,@" end=![ \t\[\]()";]!me=e-1 contains=ALL
- syn region schemeUnquote matchgroup=Delimiter start="#,(" end=")" contains=ALL
- syn region schemeUnquote matchgroup=Delimiter start="#,@(" end=")" contains=ALL
- syn region schemeUnquote matchgroup=Delimiter start="#,\[" end="\]" contains=ALL
- syn region schemeUnquote matchgroup=Delimiter start="#,@\[" end="\]" contains=ALL
- syn region schemeQuoted matchgroup=Delimiter start="#['`]" end=![ \t()\[\]";]!me=e-1 contains=ALL
- syn region schemeQuoted matchgroup=Delimiter start="#['`](" matchgroup=Delimiter end=")" contains=ALL
-
- " Identifiers are very liberal in MzScheme/Racket
- syn match schemeOther ![^()[\]{}",'`;#|\\ ]\+!
-
- " Language setting
- syn match schemeLang "#lang [-+_/A-Za-z0-9]\+\>"
-
- " Various number forms
- syn match schemeNumber "[-+]\=[0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\>"
- syn match schemeNumber "[-+]\=\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\>"
- syn match schemeNumber "[-+]\=[0-9]\+/[0-9]\+\>"
- syn match schemeNumber "\([-+]\=\([0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\|\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\|[0-9]\+/[0-9]\+\)\)\=[-+]\([0-9]\+\(\.[0-9]*\)\=\(e[-+]\=[0-9]\+\)\=\|\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\|[0-9]\+/[0-9]\+\)\=i\>"
+if exists('g:is_chicken') || exists('b:is_chicken')
+ syn region schemeImport matchgroup=schemeImport start="\(([ \t\n]*\)\@<=\(import\|import-syntax\|use\|require-extension\)\(-for-syntax\)\?\>" end=")"me=e-1 contained contains=schemeImportForm,schemeIdentifier,schemeComment,schemeDatumComment
+else
+ syn region schemeImport matchgroup=schemeImport start="\(([ \t\n]*\)\@<=\(import\)\>" end=")"me=e-1 contained contains=schemeImportForm,schemeIdentifier,schemeComment,schemeDatumComment
endif
-
-if exists("b:is_chicken") || exists("is_chicken")
- " multiline comment
- syntax region schemeMultilineComment start=/#|/ end=/|#/ contains=@Spell,schemeMultilineComment
-
- syn match schemeOther "##[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+"
- syn match schemeExtSyntax "#:[-a-z!$%&*/:<=>?^_~0-9+.@#%]\+"
-
- syn keyword schemeExtSyntax unit uses declare hide foreign-declare foreign-parse foreign-parse/spec
- syn keyword schemeExtSyntax foreign-lambda foreign-lambda* define-external define-macro load-library
- syn keyword schemeExtSyntax let-values let*-values letrec-values ->string require-extension
- syn keyword schemeExtSyntax let-optionals let-optionals* define-foreign-variable define-record
- syn keyword schemeExtSyntax pointer tag-pointer tagged-pointer? define-foreign-type
- syn keyword schemeExtSyntax require require-for-syntax cond-expand and-let* receive argc+argv
- syn keyword schemeExtSyntax fixnum? fx= fx> fx< fx>= fx<= fxmin fxmax
- syn keyword schemeExtFunc ##core#inline ##sys#error ##sys#update-errno
-
- " here-string
- syn region schemeString start=+#<<\s*\z(.*\)+ end=+^\z1$+ contains=@Spell
-
- if filereadable(expand("<sfile>:p:h")."/cpp.vim")
- unlet! b:current_syntax
- syn include @ChickenC <sfile>:p:h/cpp.vim
- syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-declare "+ end=+")\@=+ contains=@ChickenC
- syn region ChickenC matchgroup=schemeComment start=+foreign-declare\s*#<<\z(.*\)$+hs=s+15 end=+^\z1$+ contains=@ChickenC
- syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-parse "+ end=+")\@=+ contains=@ChickenC
- syn region ChickenC matchgroup=schemeComment start=+foreign-parse\s*#<<\z(.*\)$+hs=s+13 end=+^\z1$+ contains=@ChickenC
- syn region ChickenC matchgroup=schemeOther start=+(\@<=foreign-parse/spec "+ end=+")\@=+ contains=@ChickenC
- syn region ChickenC matchgroup=schemeComment start=+foreign-parse/spec\s*#<<\z(.*\)$+hs=s+18 end=+^\z1$+ contains=@ChickenC
- syn region ChickenC matchgroup=schemeComment start=+#>+ end=+<#+ contains=@ChickenC
- syn region ChickenC matchgroup=schemeComment start=+#>?+ end=+<#+ contains=@ChickenC
- syn region ChickenC matchgroup=schemeComment start=+#>!+ end=+<#+ contains=@ChickenC
- syn region ChickenC matchgroup=schemeComment start=+#>\$+ end=+<#+ contains=@ChickenC
- syn region ChickenC matchgroup=schemeComment start=+#>%+ end=+<#+ contains=@ChickenC
- endif
-
- " suggested by Alex Queiroz
- syn match schemeExtSyntax "#![-a-z!$%&*/:<=>?^_~0-9+.@#%]\+"
- syn region schemeString start=+#<#\s*\z(.*\)+ end=+^\z1$+ contains=@Spell
+syn match schemeImportKeyword "\(([ \t\n]*\)\@<=\(except\|only\|prefix\|rename\|srfi\)\>"
+syn region schemeImportForm matchgroup=schemeParentheses start="(" end=")" contained contains=schemeIdentifier,schemeComment,schemeDatumComment,@schemeImportCluster
+syn cluster schemeImportCluster contains=schemeImportForm,schemeImportKeyword
+
+syn region schemeDatumComment matchgroup=schemeDatumComment start=/#;[ \t\n`']*/ end=/[ \t\n()\[\]";]/me=e-1
+syn region schemeDatumComment matchgroup=schemeDatumComment start=/#;[ \t\n`']*"/ skip=/\\[\\"]/ end=/"/
+syn region schemeDatumComment matchgroup=schemeDatumComment start=/#;[ \t\n`']*|/ skip=/\\[\\|]/ end=/|/
+syn region schemeDatumComment matchgroup=schemeDatumComment start=/#;[ \t\n`']*\(#\([usf]\d\+\)\?\)\?(/ end=/)/ contains=schemeDatumCommentForm
+syn region schemeDatumCommentForm start="(" end=")" contained contains=schemeDatumCommentForm
+
+syn cluster schemeSyntaxCluster contains=schemeFunction,schemeKeyword,schemeSyntax,schemeExtraSyntax,schemeLibrarySyntax,schemeSyntaxSyntax
+
+syn keyword schemeLibrarySyntax define-library
+syn keyword schemeLibrarySyntax export
+syn keyword schemeLibrarySyntax include
+syn keyword schemeLibrarySyntax include-ci
+syn keyword schemeLibrarySyntax include-library-declarations
+syn keyword schemeLibrarySyntax library
+syn keyword schemeLibrarySyntax cond-expand
+
+syn keyword schemeSyntaxSyntax define-syntax
+syn keyword schemeSyntaxSyntax let-syntax
+syn keyword schemeSyntaxSyntax letrec-syntax
+syn keyword schemeSyntaxSyntax syntax-rules
+
+syn keyword schemeSyntax =>
+syn keyword schemeSyntax and
+syn keyword schemeSyntax begin
+syn keyword schemeSyntax case
+syn keyword schemeSyntax case-lambda
+syn keyword schemeSyntax cond
+syn keyword schemeSyntax define
+syn keyword schemeSyntax define-record-type
+syn keyword schemeSyntax define-values
+syn keyword schemeSyntax delay
+syn keyword schemeSyntax delay-force
+syn keyword schemeSyntax do
+syn keyword schemeSyntax else
+syn keyword schemeSyntax guard
+syn keyword schemeSyntax if
+syn keyword schemeSyntax lambda
+syn keyword schemeSyntax let
+syn keyword schemeSyntax let*
+syn keyword schemeSyntax let*-values
+syn keyword schemeSyntax let-values
+syn keyword schemeSyntax letrec
+syn keyword schemeSyntax letrec*
+syn keyword schemeSyntax or
+syn keyword s