xref: /vim-8.2.3635/runtime/syntax/baan.vim (revision 0fa313a7)
1" Vim syntax file"
2" Language:	Baan
3" Maintainer:	Erwin Smit / Her van de Vliert
4" Last change:	30-10-2001"
5
6" For version 5.x: Clear all syntax items
7" For version 6.x: Quit when a syntax file was already loaded
8if version < 600
9  syntax clear
10elseif exists("b:current_syntax")
11  finish
12endif
13
14"************************************* 3GL ************************************"
15syn match baan3gl "#ident"
16syn match baan3gl "#include"
17syn match baan3gl "#define"
18syn match baan3gl "#undef"
19syn match baan3gl "#pragma"
20syn keyword baanConditional if then else case endif while endwhile endfor endcase
21syn keyword baan3gl at based break bset call common const continue default double
22syn keyword baan3gl empty extern fixed function ge global goto gt le lt mb
23syn keyword baan3gl multibyte ne ofr prompt ref repeat static step stop string
24syn keyword baan3gl true false until void wherebind
25syn keyword baan3gl and or to not in
26syn keyword baan3gl domain table eq input end long dim return at base print
27syn match baan3gl "\<for\>" contains=baansql
28syn match baan3gl "on case"
29syn match baan3gl "e\=n\=d\=dllusage"
30
31"************************************* SQL ************************************"
32syn keyword baansqlh where reference selecterror selectbind selectdo selectempty
33syn keyword baansqlh selecteos whereused endselect unref setunref clearunref
34syn keyword baansqlh from select clear skip rows
35syn keyword baansql between inrange having
36syn match baansql "as set with \d\+ rows"
37syn match baansql "as prepared set"
38syn match baansql "as prepared set with \d\+ rows"
39syn match baansql "refers to"
40syn match baansql "with retry"
41syn match baansql "with retry repeat last row"
42syn match baansql "for update"
43syn match baansql "order by"
44syn match baansql "group by"
45syn match baansql "commit\.transaction()"
46syn match baansql "abort\.transaction()"
47syn match baansql "db\.columns\.to\.record"
48syn match baansql "db\.record\.to\.columns"
49syn match baansql "db\.bind"
50syn match baansql "db\.change\.order"
51syn match baansql "\<db\.eq"
52syn match baansql "\<db\.first"
53syn match baansql "\<db\.gt"
54syn match baansql "\<db\.ge"
55syn match baansql "\<db\.le"
56syn match baansql "\<db\.next"
57syn match baansql "\<db\.prev"
58syn match baansql "\<db\.insert"
59syn match baansql "\<db\.delete"
60syn match baansql "\<db\.update"
61syn match baansql "\<db\.create\.table"
62syn match baansql "db\.set\.to\.default"
63syn match baansql "db\.retry"
64syn match baansql "DB\.RETRY"
65syn match baansql "db\.delayed\.lock"
66syn match baansql "db\.retry\.point()"
67syn match baansql "db\.retry\.hit()"
68syn match baansql "db\.return\.dupl"
69syn match baansql "db\.skip\.dupl"
70syn match baansql "db\.row\.length"
71
72"************************************* 4GL ************************************"
73" Program section
74syn match baan4glh "declaration:"
75syn match baan4glh "functions:"
76syn match baan4glh "before\.program:"
77syn match baan4glh "on\.error:"
78syn match baan4glh "after\.program:"
79syn match baan4glh "after\.update.db.commit:"
80syn match baan4glh "before\.display\.object:"
81
82" Form section
83syn match baan4glh "form\.\d\+:"
84syn match baan4glh "form\.all:"
85syn match baan4glh "form\.other:"
86syn match baan4gl "init\.form:"
87syn match baan4gl "before\.form:"
88syn match baan4gl "after\.form:"
89
90" Choice section
91syn match baan4glh "choice\.start\.set:"
92syn match baan4glh "choice\.first\.view:"
93syn match baan4glh "choice\.next\.view:"
94syn match baan4glh "choice\.prev\.view:"
95syn match baan4glh "choice\.last\.view:"
96syn match baan4glh "choice\.def\.find:"
97syn match baan4glh "choice\.find\.data:"
98syn match baan4glh "choice\.first\.set:"
99syn match baan4glh "choice\.next\.set:"
100syn match baan4glh "choice\.display\.set:"
101syn match baan4glh "choice\.prev\.set:"
102syn match baan4glh "choice\.rotate\.curr:"
103syn match baan4glh "choice\.last\.set:"
104syn match baan4glh "choice\.add\.set:"
105syn match baan4glh "choice\.update\.db:"
106syn match baan4glh "choice\.dupl\.occur:"
107syn match baan4glh "choice\.recover\.set:"
108syn match baan4glh "choice\.mark\.delete:"
109syn match baan4glh "choice\.mark\.occur:"
110syn match baan4glh "choice\.change\.order:"
111syn match baan4glh "choice\.modify\.set:"
112syn match baan4glh "choice\.restart\.input:"
113syn match baan4glh "choice\.print\.data:"
114syn match baan4glh "choice\.create\.job:"
115syn match baan4glh "choice\.form\.tab\.change:"
116syn match baan4glh "choice\.first\.frm:"
117syn match baan4glh "choice\.next\.frm:"
118syn match baan4glh "choice\.prev\.frm:"
119syn match baan4glh "choice\.last\.frm:"
120syn match baan4glh "choice\.resize\.frm:"
121syn match baan4glh "choice\.cmd\.options:"
122syn match baan4glh "choice\.zoom:"
123syn match baan4glh "choice\.interrupt:"
124syn match baan4glh "choice\.end\.program:"
125syn match baan4glh "choice\.abort\.program:"
126syn match baan4glh "choice\.cont\.process:"
127syn match baan4glh "choice\.text\.manager:"
128syn match baan4glh "choice\.run\.job:"
129syn match baan4glh "choice\.global\.delete:"
130syn match baan4glh "choice\.global\.copy:"
131syn match baan4glh "choice\.save\.defaults"
132syn match baan4glh "choice\.get\.defaults:"
133syn match baan4glh "choice\.start\.chart:"
134syn match baan4glh "choice\.start\.query:"
135syn match baan4glh "choice\.user\.\d:"
136syn match baan4glh "choice\.ask\.helpinfo:"
137syn match baan4glh "choice\.calculator:"
138syn match baan4glh "choice\.calendar:"
139syn match baan4glh "choice\.bms:"
140syn match baan4glh "choice\.cmd\.whats\.this:"
141syn match baan4glh "choice\.help\.index:"
142syn match baan4gl "before\.choice:"
143syn match baan4gl "on\.choice:"
144syn match baan4gl "after\.choice:"
145
146" Field section
147syn match baan4glh "field\.\l\{5}\d\{3}\.\l\{4}\.\=c\=:"
148syn match baan4glh "field\.e\..\+:"
149syn match baan4glh "field\.all:"
150syn match baan4glh "field\.other:"
151syn match baan4gl "init\.field:"
152syn match baan4gl "before\.field:"
153syn match baan4gl "before\.input:"
154syn match baan4gl "before\.display:"
155syn match baan4gl "before\.zoom:"
156syn match baan4gl "before\.checks:"
157syn match baan4gl "domain\.error:"
158syn match baan4gl "ref\.input:"
159syn match baan4gl "ref\.display:"
160syn match baan4gl "check\.input:"
161syn match baan4gl "on\.input:"
162syn match baan4gl "when\.field\.changes:"
163syn match baan4gl "after\.zoom:"
164syn match baan4gl "after\.input:"
165syn match baan4gl "after\.display:"
166syn match baan4gl "after\.field:"
167
168" Group section
169syn match baan4glh "group\.\d\+:"
170syn match baan4gl "init\.group:"
171syn match baan4gl "before\.group:"
172syn match baan4gl "after\.group:"
173
174" Zoom section
175syn match baan4glh "zoom\.from\..\+:"
176syn match baan4gl "on\.entry:"
177syn match baan4gl "on\.exit:"
178" Main table section
179syn match baan4glh "main\.table\.io:"
180syn match baan4gl "before\.read:"
181syn match baan4gl "after\.read:"
182syn match baan4gl "before\.write:"
183syn match baan4gl "after\.write:"
184syn match baan4gl "after\.skip\.write:"
185syn match baan4gl "before\.rewrite:"
186syn match baan4gl "after\.rewrite:"
187syn match baan4gl "after\.skip\.rewrite:"
188syn match baan4gl "before\.delete:"
189syn match baan4gl "after\.delete:"
190syn match baan4gl "after\.skip\.delete:"
191syn match baan4gl "read\.view:"
192
193"number without a dot."
194syn match  baanNumber		"\<\-\=\d\+\>"
195"number with dot"
196syn match  baanNumber		"\<\-\=\d\+\.\d*\>"
197"number starting with a dot"
198syn match  baanNumber		"\<\-\=\.\d\+\>"
199
200" String"
201syn region  baanString	start=+"+  skip=+""+  end=+"+
202" Comment"
203syn match   baanComment "|$"
204syn match   baanComment "|.$"
205syn match   baanComment "|[^ ]"
206syn match   baanComment	"|[^#].*[^ ]"
207syn match   baanCommenth "^|#lra.*$"
208syn match   baanCommenth "^|#mdm.*$"
209syn match   baanCommenth "^|#[0-9][0-9][0-9][0-9][0-9].*$"
210syn match   baanCommenth "^|#N\=o\=Include.*$"
211syn region  baanComment start="dllusage" end="enddllusage"
212" Oldcode"
213syn match   baanUncommented	"^|[^*#].*[^ ]"
214" SpaceError"
215syn match  BaanSpaces	" "
216syn match  baanSpaceError	"\s*$"
217syn match  baanSpaceError	"        "
218
219" Define the default highlighting.
220" For version 5.7 and earlier: only when not done already
221" For version 5.8 and later: only when an item doesn't have highlighting yet
222if version >= 508 || !exists("did_baan_syn_inits")
223  if version < 508
224    let did_c_syn_inits = 1
225    command -nargs=+ HiLink hi link <args>
226  else
227    command -nargs=+ HiLink hi def link <args>
228  endif
229
230  HiLink baanConditional	Conditional
231  HiLink baan3gl		Statement
232  HiLink baan4gl		Statement
233  HiLink baan4glh		Statement
234  HiLink baansql		Statement
235  HiLink baansqlh		Statement
236  HiLink baanNumber		Number
237  HiLink baanString		String
238  HiLink baanComment		Comment
239  HiLink baanCommenth		Comment
240  HiLink baanUncommented	Comment
241
242  delcommand HiLink
243endif
244
245let b:current_syntax = "baan"
246
247" vim: ts=8
248