annotate runtime/syntax/jess.vim @ 31041:ce04a773d598 v9.0.0855

patch 9.0.0855: comment not located above the code it refers to Commit: https://github.com/vim/vim/commit/09a93e3e66689c691a00fce25e4ce310d81edaee Author: zeertzjq <zeertzjq@outlook.com> Date: Thu Nov 10 17:05:28 2022 +0000 patch 9.0.0855: comment not located above the code it refers to Problem: Comment not located above the code it refers to. Solution: Move the comment. (closes https://github.com/vim/vim/issues/11527)
author Bram Moolenaar <Bram@vim.org>
date Thu, 10 Nov 2022 18:15:04 +0100
parents 46763b01cd9a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Jess
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Paul Baleme <pbaleme@mail.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last change: September 14, 2000
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Based on lisp.vim by : Dr. Charles E. Campbell, Jr.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
7 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
8 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
12 setlocal iskeyword=42,43,45,47-58,60-62,64-90,97-122,_
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " Lists
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn match jessSymbol ![^()'`,"; \t]\+! contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn match jessBarSymbol !|..\{-}|! contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn region jessList matchgroup=Delimiter start="(" skip="|.\{-}|" matchgroup=Delimiter end=")" contains=jessAtom,jessBQList,jessConcat,jessDeclaration,jessList,jessNumber,jessSymbol,jessSpecial,jessFunc,jessKey,jessAtomMark,jessString,jessComment,jessBarSymbol,jessAtomBarSymbol,jessVar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn region jessBQList matchgroup=PreProc start="`(" skip="|.\{-}|" matchgroup=PreProc end=")" contains=jessAtom,jessBQList,jessConcat,jessDeclaration,jessList,jessNumber,jessSpecial,jessSymbol,jessFunc,jessKey,jessVar,jessAtomMark,jessString,jessComment,jessBarSymbol,jessAtomBarSymbol
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " Atoms
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match jessAtomMark "'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match jessAtom "'("me=e-1 contains=jessAtomMark nextgroup=jessAtomList
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match jessAtom "'[^ \t()]\+" contains=jessAtomMark
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match jessAtomBarSymbol !'|..\{-}|! contains=jessAtomMark
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn region jessAtom start=+'"+ skip=+\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn region jessAtomList matchgroup=Special start="(" skip="|.\{-}|" matchgroup=Special end=")" contained contains=jessAtomList,jessAtomNmbr0,jessString,jessComment,jessAtomBarSymbol
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match jessAtomNmbr "\<[0-9]\+" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 " Standard jess Functions and Macros
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword jessFunc * + ** - / < > <= >= <> =
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword jessFunc long longp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword jessFunc abs agenda and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword jessFunc assert assert-string bag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword jessFunc batch bind bit-and
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword jessFunc bit-not bit-or bload
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword jessFunc bsave build call
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword jessFunc clear clear-storage close
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn keyword jessFunc complement$ context count-query-results
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword jessFunc create$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword jessFunc delete$ div
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword jessFunc do-backward-chaining e
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword jessFunc engine eq eq*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword jessFunc eval evenp exit
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword jessFunc exp explode$ external-addressp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword jessFunc fact-slot-value facts fetch
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword jessFunc first$ float floatp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword jessFunc foreach format gensym*
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword jessFunc get get-fact-duplication
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword jessFunc get-member get-multithreaded-io
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword jessFunc get-reset-globals get-salience-evaluation
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword jessFunc halt if implode$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword jessFunc import insert$ integer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword jessFunc integerp intersection$ jess-version-number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword jessFunc jess-version-string length$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword jessFunc lexemep list-function$ load-facts
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword jessFunc load-function load-package log
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword jessFunc log10 lowcase matches
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword jessFunc max member$ min
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword jessFunc mod modify multifieldp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn keyword jessFunc neq new not
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword jessFunc nth$ numberp oddp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn keyword jessFunc open or pi
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn keyword jessFunc ppdeffunction ppdefglobal ddpefrule
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword jessFunc printout random read
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn keyword jessFunc readline replace$ reset
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn keyword jessFunc rest$ retract retract-string
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword jessFunc return round rules
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword jessFunc run run-query run-until-halt
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword jessFunc save-facts set set-fact-duplication
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn keyword jessFunc set-factory set-member set-multithreaded-io
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword jessFunc set-node-index-hash set-reset-globals
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn keyword jessFunc set-salience-evaluation set-strategy
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn keyword jessFunc setgen show-deffacts show-deftemplates
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword jessFunc show-jess-listeners socket
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn keyword jessFunc sqrt store str-cat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn keyword jessFunc str-compare str-index str-length
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword jessFunc stringp sub-string subseq$
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn keyword jessFunc subsetp sym-cat symbolp
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn keyword jessFunc system throw time
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn keyword jessFunc try undefadvice undefinstance
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword jessFunc undefrule union$ unwatch
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword jessFunc upcase view watch
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn keyword jessFunc while
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn match jessFunc "\<c[ad]\+r\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 " jess Keywords (modifiers)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn keyword jessKey defglobal deffunction defrule
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn keyword jessKey deffacts
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn keyword jessKey defadvice defclass definstance
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 " Standard jess Variables
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn region jessVar start="?" end="[^a-zA-Z0-9]"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 " Strings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn region jessString start=+"+ skip=+\\"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 " Shared with Declarations, Macros, Functions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 "syn keyword jessDeclaration
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn match jessNumber "[0-9]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 syn match jessSpecial "\*[a-zA-Z_][a-zA-Z_0-9-]*\*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn match jessSpecial !#|[^()'`,"; \t]\+|#!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 syn match jessSpecial !#x[0-9a-fA-F]\+!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 syn match jessSpecial !#o[0-7]\+!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn match jessSpecial !#b[01]\+!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 syn match jessSpecial !#\\[ -\~]!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 syn match jessSpecial !#[':][^()'`,"; \t]\+!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn match jessSpecial !#([^()'`,"; \t]\+)!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 syn match jessConcat "\s\.\s"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 syntax match jessParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 syn match jessComment ";.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 " synchronization
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 syn sync lines=100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
121 " Only when an item doesn't have highlighting yet
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
123 hi def link jessAtomNmbr jessNumber
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
124 hi def link jessAtomMark jessMark
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
126 hi def link jessAtom Identifier
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
127 hi def link jessAtomBarSymbol Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
128 hi def link jessBarSymbol Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
129 hi def link jessComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
130 hi def link jessConcat Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
131 hi def link jessDeclaration Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
132 hi def link jessFunc Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
133 hi def link jessKey Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
134 hi def link jessMark Delimiter
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
135 hi def link jessNumber Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
136 hi def link jessParenError Error
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
137 hi def link jessSpecial Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
138 hi def link jessString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
139 hi def link jessVar Identifier
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 let b:current_syntax = "jess"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 " vim: ts=18