blob: 39d75e882686a5ab5b34cc80445746d663658139 [file] [log] [blame]
Bram Moolenaar2c7a7632007-05-10 18:19:11 +00001" Vim syntax file
2" Language: FrameScript v4.0
3" Maintainer: Nikolai Weibull <now@bitwi.se>
4" Latest Revision: 2007-02-22
5
6if exists("b:current_syntax")
7 finish
8endif
9
10let s:cpo_save = &cpo
11set cpo&vim
12
13syn match framescriptOperator
14 \ '[+*/%=-]\|[><]=\=\|#[&|]'
15
16syn keyword framescriptTodo
17 \ contained
18 \ TODO FIXME XXX NOTE
19
20syn cluster framescriptCommentGroup
21 \ contains=
22 \ framescriptTodo,
23 \ @Spell
24
25syn match framescriptComment
26 \ display
27 \ contains=@framescriptCommentGroup
28 \ '//.*$'
29
30syn region framescriptComment
31 \ contains=@framescriptCommentGroup
32 \ matchgroup=framescriptCommentStart
33 \ start='/\*'
34 \ end='\*/'
35
36syn case ignore
37
38syn match framescriptInclude
39 \ display
40 \ contains=framescriptIncluded
41 \ "^\s*<#Include\>\s*'"
42
43syn region framescriptIncluded
44 \ contained
45 \ display
46 \ start=+'+
47 \ skip=+\\\\\|\\'+
48 \ end=+'+
49
50syn match framescriptNumbers
51 \ display
52 \ transparent
53 \ contains=
54 \ framescriptInteger,
55 \ framescriptReal,
56 \ framescriptMetric,
57 \ framescriptCharacter
58 \ '\<\d\|\.\d'
59
60syn keyword framescriptBoolean
61 \ True False
62
63syn match framescriptInteger
64 \ contained
65 \ display
66 \ '\d\+\>'
67
68syn match framescriptInteger
69 \ contained
70 \ display
71 \ '\x\+H\>'
72
73syn match framescriptInteger
74 \ contained
75 \ display
76 \ '[01]\+B\>'
77
78syn match framescriptReal
79 \ contained
80 \ display
81 \ '\d\+\.\d*\|\.\d\+\>'
82
83syn match framescriptMetric
84 \ contained
85 \ display
86 \ '\%(\d\+\%(\.\d*\)\=\|\.\d\+\)\%(pts\|in\|"\|cm\|mm\|pica\)\>'
87
88syn match framescriptCharacter
89 \ contained
90 \ display
91 \ '\d\+S\>'
92
93syn region framescriptString
94 \ contains=framescriptStringSpecialChar,@Spell
95 \ start=+'+
96 \ skip=+\\\\\|\\'+
97 \ end=+'+
98
99syn match framescriptStringSpecialChar
100 \ contained
101 \ display
102 \ "\\[\\']"
103
104syn keyword framescriptConstant
105 \ BackSlash
106 \ CharCR
107 \ CharLF
108 \ CharTAB
109 \ ClientDir
110 \ ClientName
111 \ FslVersionMajor
112 \ FslVersionMinor
113 \ InstallName
114 \ InstalledScriptList
115 \ MainScript
116 \ NULL
117 \ ObjEndOffset
118 \ ProductRevision
119 \ Quote
120 \ ThisScript
121
122syn keyword framescriptOperator
123 \ not
124 \ and
125 \ or
126
127syn keyword framescriptSessionVariables
128 \ ErrorCode
129 \ ErrorMsg
130 \ DeclareVarMode
131 \ PlatformEncodingMode
132
133syn keyword framescriptStructure
134 \ Event
135 \ EndEvent
136
137syn keyword framescriptStatement
138 \ Sub
139 \ EndSub
140 \ Run
141 \ Function
142 \ EndFunction
143 \ Set
144 \ Add
145 \ Apply
146 \ CallClient
147 \ Close
148 \ Copy
149 \ Cut
150 \ DialogBox
151 \ Delete
152 \ Demote
153 \ Display
154 \ DocCompare
155 \ Export
156 \ Find
157 \ LeaveLoop
158 \ LeaveScript
159 \ LeaveSub
160 \ LoopNext
161 \ Merge
162 \ MsgBox
163 \ Paste
164 \ PopClipboard
165 \ PushClipboard
166 \ Read
167 \ Replace
168 \ Return
169 \ Sort
170 \ Split
171
172syn keyword framescriptStatement
173 \ nextgroup=framescriptApplySubStatement skipwhite skipempty
174 \ Apply
175
176syn keyword framescriptApplySubStatement
177 \ contained
178 \ Pagelayout
179 \ TextProperties
180
181syn keyword framescriptStatement
182 \ nextgroup=framescriptClearSubStatement skipwhite skipempty
183 \ Clear
184
185syn keyword framescriptClearSubStatement
186 \ contained
187 \ ChangeBars
188 \ Text
189
190syn keyword framescriptStatement
191 \ nextgroup=framescriptCloseSubStatement skipwhite skipempty
192 \ Close
193
194syn keyword framescriptCloseSubStatement
195 \ contained
196 \ Book
197 \ Document
198 \ TextFile
199
200syn keyword framescriptStatement
201 \ nextgroup=framescriptExecSubStatement skipwhite skipempty
202 \ Exec
203
204syn keyword framescriptExecSubStatement
205 \ contained
206 \ Compile
207 \ Script
208 \ Wait
209
210syn keyword framescriptStatement
211 \ nextgroup=framescriptExecuteSubStatement skipwhite skipempty
212 \ Execute
213
214syn keyword framescriptExecuteSubStatement
215 \ contained
216 \ FrameCommand
217 \ Hypertext
218 \ StartUndoCheckPoint
219 \ EndUndoCheckPoint
220 \ ClearUndoHistory
221
222syn keyword framescriptStatement
223 \ nextgroup=framescriptGenerateSubStatement skipwhite skipempty
224 \ Generate
225
226syn keyword framescriptGenerateSubStatement
227 \ contained
228 \ Bookfile
229
230syn keyword framescriptStatement
231 \ nextgroup=framescriptGetSubStatement skipwhite skipempty
232 \ Get
233
234syn keyword framescriptGetSubStatement
235 \ contained
236 \ Member
237 \ Object
238 \ String
239 \ TextList
240 \ TextProperties
241
242syn keyword framescriptStatement
243 \ nextgroup=framescriptImportSubStatement skipwhite skipempty
244 \ Import
245
246syn keyword framescriptImportSubStatement
247 \ contained
248 \ File
249 \ Formats
250 \ ElementDefs
251
252syn keyword framescriptStatement
253 \ nextgroup=framescriptInstallSubStatement skipwhite skipempty
254 \ Install
255 \ Uninstall
256
257syn keyword framescriptInstallSubStatement
258 \ contained
259 \ ChangeBars
260 \ Text
261
262syn keyword framescriptStatement
263 \ nextgroup=framescriptNewSubStatement skipwhite skipempty
264 \ New
265
266syn keyword framescriptNewSubStatement
267 \ contained
268 \ AFrame
269 \ Footnote
270 \ Marker
271 \ TiApiClient
272 \ Variable
273 \ XRef
274 \ FormatChangeList
275 \ FormatRule
276 \ FmtRuleClause
277 \ Arc
278 \ Ellipse
279 \ Flow
280 \ Group
281 \ Inset
282 \ Line
283 \ Math
284 \ Polygon
285 \ Polyline
286 \ Rectangle
287 \ RoundRect
288 \ TextFrame
289 \ Textline
290 \ UnanchoredFrame
291 \ Command
292 \ Menu
293 \ MenuItemSeparator
294 \ Book
295 \ CharacterFormat
296 \ Color
297 \ ConditionFormat
298 \ ElementDef
299 \ FormatChangeList
300 \ MarkerType
301 \ MasterPage
302 \ ParagraphFormat
303 \ PgfFmt
304 \ ReferencePAge
305 \ RulingFormat
306 \ TableFormat
307 \ VariableFormat
308 \ XRefFormat
309 \ BodyPage
310 \ BookComponent
311 \ Paragraph
312 \ Element
313 \ Attribute
314 \ AttributeDef
315 \ AttributeList
316 \ AttributeDefList
317 \ ElementLoc
318 \ ElementRange
319 \ Table
320 \ TableRows
321 \ TableCols
322 \ Text
323 \ Integer
324 \ Real
325 \ Metric
326 \ String
327 \ Object
328 \ TextLoc
329 \ TextRange
330 \ IntList
331 \ UIntList
332 \ MetricList
333 \ StringList
334 \ PointList
335 \ TabList
336 \ PropertyList
337 \ LibVar
338 \ ScriptVar
339 \ SubVar
340 \ TextFile
341
342syn keyword framescriptStatement
343 \ nextgroup=framescriptOpenSubStatement skipwhite skipempty
344 \ Open
345
346syn keyword framescriptOpenSubStatement
347 \ contained
348 \ Document
349 \ Book
350 \ TextFile
351
352syn keyword framescriptStatement
353 \ nextgroup=framescriptPrintSubStatement skipwhite skipempty
354 \ Print
355
356syn keyword framescriptPrintSubStatement
357 \ contained
358 \ Document
359 \ Book
360
361syn keyword framescriptStatement
362 \ nextgroup=framescriptQuitSubStatement skipwhite skipempty
363 \ Quit
364
365syn keyword framescriptQuitSubStatement
366 \ contained
367 \ Session
368
369syn keyword framescriptStatement
370 \ nextgroup=framescriptRemoveSubStatement skipwhite skipempty
371 \ Remove
372
373syn keyword framescriptRemoveSubStatement
374 \ contained
375 \ Attribute
376 \ CommandObject
377
378syn keyword framescriptStatement
379 \ nextgroup=framescriptSaveSubStatement skipwhite skipempty
380 \ Save
381
382syn keyword framescriptSaveSubStatement
383 \ contained
384 \ Document
385 \ Book
386
387syn keyword framescriptStatement
388 \ nextgroup=framescriptSelectSubStatement skipwhite skipempty
389 \ Select
390
391syn keyword framescriptSelectSubStatement
392 \ contained
393 \ TableCells
394
395syn keyword framescriptStatement
396 \ nextgroup=framescriptStraddleSubStatement skipwhite skipempty
397 \ Straddle
398
399syn keyword framescriptStraddleSubStatement
400 \ contained
401 \ TableCells
402
403syn keyword framescriptStatement
404 \ nextgroup=framescriptUpdateSubStatement skipwhite skipempty
405 \ Update
406
407syn keyword framescriptUpdateSubStatement
408 \ contained
409 \ ReDisplay
410 \ Formatting
411 \ Hyphenating
412 \ ResetEquationsSettings
413 \ ResetRefFrames
414 \ RestartPgfNums
415 \ TextInset
416 \ Variables
417 \ XRefs
418 \ Book
419
420syn keyword framescriptStatement
421 \ nextgroup=framescriptWriteSubStatement skipwhite skipempty
422 \ Write
423
424syn keyword framescriptUpdateSubStatement
425 \ contained
426 \ Console
427 \ Display
428
429syn keyword framescriptRepeat
430 \ Loop
431 \ EndLoop
432
433syn keyword framescriptConditional
434 \ If
435 \ ElseIf
436 \ Else
437 \ EndIf
438
439syn keyword framescriptType
440 \ Local
441 \ GlobalVar
442
443let b:framescript_minlines = exists("framescript_minlines")
444 \ ? framescript_minlines : 15
445exec "syn sync ccomment framescriptComment minlines=" . b:framescript_minlines
446
447hi def link framescriptTodo Todo
448hi def link framescriptComment Comment
449hi def link framescriptCommentStart framescriptComment
450hi def link framescriptInclude Include
451hi def link framescriptIncluded String
452hi def link framescriptBoolean Boolean
453hi def link framescriptNumber Number
454hi def link framescriptInteger framescriptNumber
455hi def link framescriptReal framescriptNumber
456hi def link framescriptMetric framescriptNumber
457hi def link framescriptCharacter framescriptNumber
458hi def link framescriptString String
459hi def link framescriptStringSpecialChar SpecialChar
460hi def link framescriptConstant Constant
461hi def link framescriptOperator None
462hi def link framescriptSessionVariables PreProc
463hi def link framescriptStructure Structure
464hi def link framescriptStatement Statement
465hi def link framescriptSubStatement Type
466hi def link framescriptApplySubStatement framescriptSubStatement
467hi def link framescriptClearSubStatement framescriptSubStatement
468hi def link framescriptCloseSubStatement framescriptSubStatement
469hi def link framescriptExecSubStatement framescriptSubStatement
470hi def link framescriptExecuteSubStatement framescriptSubStatement
471hi def link framescriptGenerateSubStatement framescriptSubStatement
472hi def link framescriptGetSubStatement framescriptSubStatement
473hi def link framescriptImportSubStatement framescriptSubStatement
474hi def link framescriptInstallSubStatement framescriptSubStatement
475hi def link framescriptNewSubStatement framescriptSubStatement
476hi def link framescriptOpenSubStatement framescriptSubStatement
477hi def link framescriptPrintSubStatement framescriptSubStatement
478hi def link framescriptQuitSubStatement framescriptSubStatement
479hi def link framescriptRemoveSubStatement framescriptSubStatement
480hi def link framescriptSaveSubStatement framescriptSubStatement
481hi def link framescriptSelectSubStatement framescriptSubStatement
482hi def link framescriptStraddleSubStatement framescriptSubStatement
483hi def link framescriptUpdateSubStatement framescriptSubStatement
484hi def link framescriptRepeat Repeat
485hi def link framescriptConditional Conditional
486hi def link framescriptType Type
487
488let b:current_syntax = "framescript"
489
490let &cpo = s:cpo_save
491unlet s:cpo_save