annotate runtime/syntax/occam.vim @ 18627:169c810d4e51 v8.1.2306

patch 8.1.2306: double and triple clicks are not tested Commit: https://github.com/vim/vim/commit/f36a2c7e60d86b1a1733a8f51ed72da9c6f76eb8 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 16 18:57:16 2019 +0100 patch 8.1.2306: double and triple clicks are not tested Problem: Double and triple clicks are not tested. Solution: Test mouse clicks to select text. (closes https://github.com/vim/vim/issues/5226)
author Bram Moolenaar <Bram@vim.org>
date Sat, 16 Nov 2019 19:00:05 +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: occam
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Copyright: Fred Barnes <frmb2@kent.ac.uk>, Mario Schweigler <ms44@kent.ac.uk>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Maintainer: Mario Schweigler <ms44@kent.ac.uk>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Last Change: 24 May 2003
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 "{{{ Settings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " Set shift width for indent
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 setlocal shiftwidth=2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 " Set the tab key size to two spaces
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 setlocal softtabstop=2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " Let tab keys always be expanded to spaces
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 setlocal expandtab
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " Dots are valid in occam identifiers
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 setlocal iskeyword+=.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 "}}}
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword occamType BYTE BOOL INT INT16 INT32 INT64 REAL32 REAL64 ANY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword occamType CHAN DATA OF TYPE TIMER INITIAL VAL PORT MOBILE PLACED
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword occamType PROCESSOR PACKED RECORD PROTOCOL SHARED ROUND TRUNC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword occamStructure SEQ PAR IF ALT PRI FORKING PLACE AT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword occamKeyword PROC IS TRUE FALSE SIZE RECURSIVE REC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword occamKeyword RETYPES RESHAPES STEP FROM FOR RESCHEDULE STOP SKIP FORK
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword occamKeyword FUNCTION VALOF RESULT ELSE CLONE CLAIM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword occamBoolean TRUE FALSE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword occamRepeat WHILE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword occamConditional CASE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn keyword occamConstant MOSTNEG MOSTPOS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match occamBrackets /\[\|\]/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match occamParantheses /(\|)/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword occamOperator AFTER TIMES MINUS PLUS INITIAL REM AND OR XOR NOT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword occamOperator BITAND BITOR BITNOT BYTESIN OFFSETOF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match occamOperator /::\|:=\|?\|!/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match occamOperator /<\|>\|+\|-\|\*\|\/\|\\\|=\|\~/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match occamOperator /@\|\$\$\|%\|&&\|<&\|&>\|<\]\|\[>\|\^/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn match occamSpecialChar /\M**\|*'\|*"\|*#\(\[0-9A-F\]\+\)/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match occamChar /\M\L\='\[^*\]'/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match occamChar /L'[^']*'/ contains=occamSpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match occamTodo /\<todo\>:\=/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn match occamNote /\<note\>:\=/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword occamNote NOT contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match occamComment /--.*/ contains=occamCommentTitle,occamTodo,occamNote
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match occamCommentTitle /--\s*\u\a*\(\s\+\u\a*\)*:/hs=s+2 contained contains=occamTodo,occamNote
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn match occamCommentTitle /--\s*KROC-LIBRARY\(\.so\|\.a\)\=\s*$/hs=s+2 contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match occamCommentTitle /--\s*\(KROC-OPTIONS:\|RUN-PARAMETERS:\)/hs=s+2 contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match occamIdentifier /\<[A-Z.][A-Z.0-9]*\>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match occamFunction /\<[A-Za-z.][A-Za-z0-9.]*\>/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn match occamPPIdentifier /##.\{-}\>/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn region occamString start=/"/ skip=/\M*"/ end=/"/ contains=occamSpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn region occamCharString start=/'/ end=/'/ contains=occamSpecialChar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn match occamNumber /\<\d\+\(\.\d\+\(E\(+\|-\)\d\+\)\=\)\=/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match occamNumber /-\d\+\(\.\d\+\(E\(+\|-\)\d\+\)\=\)\=/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn match occamNumber /#\(\d\|[A-F]\)\+/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn match occamNumber /-#\(\d\|[A-F]\)\+/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn keyword occamCDString SHARED EXTERNAL DEFINED NOALIAS NOUSAGE NOT contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn keyword occamCDString FILE LINE PROCESS.PRIORITY OCCAM2.5 contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn keyword occamCDString USER.DEFINED.OPERATORS INITIAL.DECL MOBILES contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword occamCDString BLOCKING.SYSCALLS VERSION NEED.QUAD.ALIGNMENT contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword occamCDString TARGET.CANONICAL TARGET.CPU TARGET.OS TARGET.VENDOR contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn keyword occamCDString TRUE FALSE AND OR contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn match occamCDString /<\|>\|=\|(\|)/ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn region occamCDirective start=/#\(USE\|INCLUDE\|PRAGMA\|DEFINE\|UNDEFINE\|UNDEF\|IF\|ELIF\|ELSE\|ENDIF\|WARNING\|ERROR\|RELAX\)\>/ end=/$/ contains=occamString,occamComment,occamCDString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
89 hi def link occamType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
90 hi def link occamKeyword Keyword
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
91 hi def link occamComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
92 hi def link occamCommentTitle PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
93 hi def link occamTodo Todo
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
94 hi def link occamNote Todo
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
95 hi def link occamString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
96 hi def link occamCharString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
97 hi def link occamNumber Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
98 hi def link occamCDirective PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
99 hi def link occamCDString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
100 hi def link occamPPIdentifier PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
101 hi def link occamBoolean Boolean
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
102 hi def link occamSpecialChar SpecialChar
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
103 hi def link occamChar Character
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
104 hi def link occamStructure Structure
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
105 hi def link occamIdentifier Identifier
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
106 hi def link occamConstant Constant
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
107 hi def link occamOperator Operator
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
108 hi def link occamFunction Ignore
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
109 hi def link occamRepeat Repeat
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
110 hi def link occamConditional Conditional
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
111 hi def link occamBrackets Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
112 hi def link occamParantheses Delimiter
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 let b:current_syntax = "occam"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116