annotate runtime/syntax/scilab.vim @ 1103:95723058b8ff v7.0.229

updated for version 7.0-229
author vimboss
date Thu, 26 Apr 2007 14:48:01 +0000
parents 3fc0f57ecb91
children 43efa4f5a8ea
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 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Language : Scilab
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Maintainer : Benoit Hamelin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " File type : *.sci (see :help filetype)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " History
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " 28jan2002 benoith 0.1 Creation. Adapted from matlab.vim.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " 04feb2002 benoith 0.5 Fixed bugs with constant highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 " Reserved words.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn keyword scilabStatement abort clear clearglobal end exit global mode predef quit resume
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn keyword scilabStatement return
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn keyword scilabFunction function endfunction funptr
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword scilabPredicate null iserror isglobal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword scilabKeyword typename
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword scilabDebug debug pause what where whereami whereis who whos
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword scilabRepeat for while break
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword scilabConditional if then else elseif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword scilabMultiplex select case
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 " Reserved constants.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match scilabConstant "\(%\)[0-9A-Za-z?!#$]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match scilabBoolean "\(%\)[FTft]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 " Delimiters and operators.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match scilabDelimiter "[][;,()]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match scilabComparison "[=~]="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match scilabComparison "[<>]=\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn match scilabComparison "<>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match scilabLogical "[&|~]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match scilabAssignment "="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn match scilabArithmetic "[+-]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn match scilabArithmetic "\.\=[*/\\]\.\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match scilabArithmetic "\.\=^"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match scilabRange ":"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match scilabMlistAccess "\."
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn match scilabLineContinuation "\.\{2,}"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match scilabTransposition "[])a-zA-Z0-9?!_#$.]'"lc=1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " Comments and tools.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword scilabTodo TODO todo FIXME fixme TBD tbd contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match scilabComment "//.*$" contains=scilabTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " Constants.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn match scilabNumber "[0-9]\+\(\.[0-9]*\)\=\([DEde][+-]\=[0-9]\+\)\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn match scilabNumber "\.[0-9]\+\([DEde][+-]\=[0-9]\+\)\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn region scilabString start=+'+ skip=+''+ end=+'+ oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn region scilabString start=+"+ end=+"+ oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 " Identifiers.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn match scilabIdentifier "\<[A-Za-z?!_#$][A-Za-z0-9?!_#$]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match scilabOverload "%[A-Za-z0-9?!_#$]\+_[A-Za-z0-9?!_#$]\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 if version >= 508 || !exists("did_scilab_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 let did_scilab_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 HiLink scilabStatement Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 HiLink scilabFunction Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 HiLink scilabPredicate Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 HiLink scilabKeyword Keyword
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 HiLink scilabDebug Debug
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 HiLink scilabRepeat Repeat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 HiLink scilabConditional Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 HiLink scilabMultiplex Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 HiLink scilabConstant Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 HiLink scilabBoolean Boolean
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 HiLink scilabDelimiter Delimiter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 HiLink scilabMlistAccess Delimiter
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 HiLink scilabComparison Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 HiLink scilabLogical Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 HiLink scilabAssignment Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 HiLink scilabArithmetic Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 HiLink scilabRange Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 HiLink scilabLineContinuation Underlined
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 HiLink scilabTransposition Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 HiLink scilabTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 HiLink scilabComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 HiLink scilabNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 HiLink scilabString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 HiLink scilabIdentifier Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 HiLink scilabOverload Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 let b:current_syntax = "scilab"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 "EOF vim: ts=4 noet tw=100 sw=4 sts=0