annotate runtime/syntax/ampl.vim @ 10528:3ea703795a4f v8.0.0154

commit https://github.com/vim/vim/commit/31f19ce0a052f7c76d44a9a190e468c79cf5d56d Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 8 14:14:43 2017 +0100 patch 8.0.0154: system() test fails on OS/X Problem: system() test fails on OS/X. Solution: Deal with leading spaces.
author Christian Brabandt <cb@256bit.org>
date Sun, 08 Jan 2017 14: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 " Language: ampl (A Mathematical Programming Language)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Maintainer: Krief David <david.krief@etu.enseeiht.fr> or <david_krief@hotmail.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Last Change: 2003 May 11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
6 " 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
7 if exists("b:current_syntax")
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 endif
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 "--
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn match amplEntityKeyword "\(subject to\)\|\(subj to\)\|\(s\.t\.\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn keyword amplEntityKeyword minimize maximize objective
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword amplEntityKeyword coeff coef cover obj default
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword amplEntityKeyword from to to_come net_in net_out
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn keyword amplEntityKeyword dimen dimension
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
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 "--
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn keyword amplType integer binary set param var
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword amplType node ordered circular reversed symbolic
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword amplType arc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 "--
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword amplStatement check close \display drop include
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword amplStatement print printf quit reset restore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword amplStatement solve update write shell model
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword amplStatement data option let solution fix
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword amplStatement unfix end function pipe format
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 "--
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword amplConditional if then else and or
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword amplConditional exists forall in not within
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 "--
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn keyword amplRepeat while repeat for
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 "--
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword amplOperators union diff difference symdiff sum
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn keyword amplOperators inter intersect intersection cross setof
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword amplOperators by less mod div product
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 "syn keyword amplOperators min max
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 "conflict between functions max, min and operators max, min
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn match amplBasicOperators "||\|<=\|==\|\^\|<\|=\|!\|-\|\.\.\|:="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn match amplBasicOperators "&&\|>=\|!=\|\*\|>\|:\|/\|+\|\*\*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 "--
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match amplComment "\#.*"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn region amplComment start=+\/\*+ end=+\*\/+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn region amplStrings start=+\'+ skip=+\\'+ end=+\'+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn region amplStrings start=+\"+ skip=+\\"+ end=+\"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn match amplNumerics "[+-]\=\<\d\+\(\.\d\+\)\=\([dDeE][-+]\=\d\+\)\=\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn match amplNumerics "[+-]\=Infinity"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 "--
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn keyword amplSetFunction card next nextw prev prevw
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword amplSetFunction first last member ord ord0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn keyword amplBuiltInFunction abs acos acosh alias asin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn keyword amplBuiltInFunction asinh atan atan2 atanh ceil
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword amplBuiltInFunction cos exp floor log log10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword amplBuiltInFunction max min precision round sin
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn keyword amplBuiltInFunction sinh sqrt tan tanh trunc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn keyword amplRandomGenerator Beta Cauchy Exponential Gamma Irand224
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn keyword amplRandomGenerator Normal Poisson Uniform Uniform01
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 "-- to highlight the 'dot-suffixes'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn match amplDotSuffix "\h\w*\.\(lb\|ub\)"hs=e-2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn match amplDotSuffix "\h\w*\.\(lb0\|lb1\|lb2\|lrc\|ub0\)"hs=e-3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn match amplDotSuffix "\h\w*\.\(ub1\|ub2\|urc\|val\|lbs\|ubs\)"hs=e-3
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn match amplDotSuffix "\h\w*\.\(init\|body\|dinit\|dual\)"hs=e-4
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn match amplDotSuffix "\h\w*\.\(init0\|ldual\|slack\|udual\)"hs=e-5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn match amplDotSuffix "\h\w*\.\(lslack\|uslack\|dinit0\)"hs=e-6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 "--
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn match amplPiecewise "<<\|>>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 "-- Todo.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 syn keyword amplTodo contained TODO FIXME XXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112
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
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 7
diff changeset
118 " The default methods for highlighting. Can be overridden later.
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
119 hi def link amplEntityKeyword Keyword
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
120 hi def link amplType Type
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
121 hi def link amplStatement Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
122 hi def link amplOperators Operator
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
123 hi def link amplBasicOperators Operator
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
124 hi def link amplConditional Conditional
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
125 hi def link amplRepeat Repeat
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
126 hi def link amplStrings String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
127 hi def link amplNumerics Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
128 hi def link amplSetFunction Function
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
129 hi def link amplBuiltInFunction Function
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
130 hi def link amplRandomGenerator Function
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
131 hi def link amplComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
132 hi def link amplDotSuffix Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
133 hi def link amplPiecewise Special
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 let b:current_syntax = "ampl"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 " vim: ts=8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140