Merge branch 'vim-with-runtime' into feat/quickfix-title
[vim_extended.git] / runtime / syntax / framescript.vim
blob39d75e882686a5ab5b34cc80445746d663658139
1 " Vim syntax file
2 " Language:         FrameScript v4.0
3 " Maintainer:       Nikolai Weibull <now@bitwi.se>
4 " Latest Revision:  2007-02-22
6 if exists("b:current_syntax")
7   finish
8 endif
10 let s:cpo_save = &cpo
11 set cpo&vim
13 syn match   framescriptOperator
14       \ '[+*/%=-]\|[><]=\=\|#[&|]'
16 syn keyword framescriptTodo
17       \ contained
18       \ TODO FIXME XXX NOTE
20 syn cluster framescriptCommentGroup
21       \ contains=
22       \   framescriptTodo,
23       \   @Spell
25 syn match   framescriptComment
26       \ display
27       \ contains=@framescriptCommentGroup
28       \ '//.*$'
30 syn region  framescriptComment
31       \ contains=@framescriptCommentGroup
32       \ matchgroup=framescriptCommentStart
33       \ start='/\*'
34       \ end='\*/'
36 syn case ignore
38 syn match   framescriptInclude
39       \ display
40       \ contains=framescriptIncluded
41       \ "^\s*<#Include\>\s*'"
43 syn region  framescriptIncluded
44       \ contained
45       \ display
46       \ start=+'+
47       \ skip=+\\\\\|\\'+
48       \ end=+'+
50 syn match   framescriptNumbers
51       \ display
52       \ transparent
53       \ contains=
54       \   framescriptInteger,
55       \   framescriptReal,
56       \   framescriptMetric,
57       \   framescriptCharacter
58       \ '\<\d\|\.\d'
60 syn keyword framescriptBoolean
61       \ True False
63 syn match   framescriptInteger
64       \ contained
65       \ display
66       \ '\d\+\>'
68 syn match   framescriptInteger
69       \ contained
70       \ display
71       \ '\x\+H\>'
73 syn match   framescriptInteger
74       \ contained
75       \ display
76       \ '[01]\+B\>'
78 syn match   framescriptReal
79       \ contained
80       \ display
81       \ '\d\+\.\d*\|\.\d\+\>'
83 syn match   framescriptMetric
84       \ contained
85       \ display
86       \ '\%(\d\+\%(\.\d*\)\=\|\.\d\+\)\%(pts\|in\|"\|cm\|mm\|pica\)\>'
88 syn match   framescriptCharacter
89       \ contained
90       \ display
91       \ '\d\+S\>'
93 syn region  framescriptString
94       \ contains=framescriptStringSpecialChar,@Spell
95       \ start=+'+
96       \ skip=+\\\\\|\\'+
97       \ end=+'+
99 syn match   framescriptStringSpecialChar
100       \ contained
101       \ display
102       \ "\\[\\']"
104 syn 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
122 syn keyword framescriptOperator
123       \ not
124       \ and
125       \ or
127 syn keyword framescriptSessionVariables
128       \ ErrorCode
129       \ ErrorMsg
130       \ DeclareVarMode
131       \ PlatformEncodingMode
133 syn keyword framescriptStructure
134       \ Event
135       \ EndEvent
137 syn 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
172 syn keyword framescriptStatement
173       \ nextgroup=framescriptApplySubStatement skipwhite skipempty
174       \ Apply
176 syn keyword framescriptApplySubStatement
177       \ contained
178       \ Pagelayout
179       \ TextProperties
181 syn keyword framescriptStatement
182       \ nextgroup=framescriptClearSubStatement skipwhite skipempty
183       \ Clear
185 syn keyword framescriptClearSubStatement
186       \ contained
187       \ ChangeBars
188       \ Text
190 syn keyword framescriptStatement
191       \ nextgroup=framescriptCloseSubStatement skipwhite skipempty
192       \ Close
194 syn keyword framescriptCloseSubStatement
195       \ contained
196       \ Book
197       \ Document
198       \ TextFile
200 syn keyword framescriptStatement
201       \ nextgroup=framescriptExecSubStatement skipwhite skipempty
202       \ Exec
204 syn keyword framescriptExecSubStatement
205       \ contained
206       \ Compile
207       \ Script
208       \ Wait
210 syn keyword framescriptStatement
211       \ nextgroup=framescriptExecuteSubStatement skipwhite skipempty
212       \ Execute
214 syn keyword framescriptExecuteSubStatement
215       \ contained
216       \ FrameCommand
217       \ Hypertext
218       \ StartUndoCheckPoint
219       \ EndUndoCheckPoint
220       \ ClearUndoHistory
222 syn keyword framescriptStatement
223       \ nextgroup=framescriptGenerateSubStatement skipwhite skipempty
224       \ Generate
226 syn keyword framescriptGenerateSubStatement
227       \ contained
228       \ Bookfile
230 syn keyword framescriptStatement
231       \ nextgroup=framescriptGetSubStatement skipwhite skipempty
232       \ Get
234 syn keyword framescriptGetSubStatement
235       \ contained
236       \ Member
237       \ Object
238       \ String
239       \ TextList
240       \ TextProperties
242 syn keyword framescriptStatement
243       \ nextgroup=framescriptImportSubStatement skipwhite skipempty
244       \ Import
246 syn keyword framescriptImportSubStatement
247       \ contained
248       \ File
249       \ Formats
250       \ ElementDefs
252 syn keyword framescriptStatement
253       \ nextgroup=framescriptInstallSubStatement skipwhite skipempty
254       \ Install
255       \ Uninstall
257 syn keyword framescriptInstallSubStatement
258       \ contained
259       \ ChangeBars
260       \ Text
262 syn keyword framescriptStatement
263       \ nextgroup=framescriptNewSubStatement skipwhite skipempty
264       \ New
266 syn 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
342 syn keyword framescriptStatement
343       \ nextgroup=framescriptOpenSubStatement skipwhite skipempty
344       \ Open
346 syn keyword framescriptOpenSubStatement
347       \ contained
348       \ Document
349       \ Book
350       \ TextFile
352 syn keyword framescriptStatement
353       \ nextgroup=framescriptPrintSubStatement skipwhite skipempty
354       \ Print
356 syn keyword framescriptPrintSubStatement
357       \ contained
358       \ Document
359       \ Book
361 syn keyword framescriptStatement
362       \ nextgroup=framescriptQuitSubStatement skipwhite skipempty
363       \ Quit
365 syn keyword framescriptQuitSubStatement
366       \ contained
367       \ Session
369 syn keyword framescriptStatement
370       \ nextgroup=framescriptRemoveSubStatement skipwhite skipempty
371       \ Remove
373 syn keyword framescriptRemoveSubStatement
374       \ contained
375       \ Attribute
376       \ CommandObject
378 syn keyword framescriptStatement
379       \ nextgroup=framescriptSaveSubStatement skipwhite skipempty
380       \ Save
382 syn keyword framescriptSaveSubStatement
383       \ contained
384       \ Document
385       \ Book
387 syn keyword framescriptStatement
388       \ nextgroup=framescriptSelectSubStatement skipwhite skipempty
389       \ Select
391 syn keyword framescriptSelectSubStatement
392       \ contained
393       \ TableCells
395 syn keyword framescriptStatement
396       \ nextgroup=framescriptStraddleSubStatement skipwhite skipempty
397       \ Straddle
399 syn keyword framescriptStraddleSubStatement
400       \ contained
401       \ TableCells
403 syn keyword framescriptStatement
404       \ nextgroup=framescriptUpdateSubStatement skipwhite skipempty
405       \ Update
407 syn keyword framescriptUpdateSubStatement
408       \ contained
409       \ ReDisplay
410       \ Formatting
411       \ Hyphenating
412       \ ResetEquationsSettings
413       \ ResetRefFrames
414       \ RestartPgfNums
415       \ TextInset
416       \ Variables
417       \ XRefs
418       \ Book
420 syn keyword framescriptStatement
421       \ nextgroup=framescriptWriteSubStatement skipwhite skipempty
422       \ Write
424 syn keyword framescriptUpdateSubStatement
425       \ contained
426       \ Console
427       \ Display
429 syn keyword framescriptRepeat
430       \ Loop
431       \ EndLoop
433 syn keyword framescriptConditional
434       \ If
435       \ ElseIf
436       \ Else
437       \ EndIf
439 syn keyword framescriptType
440       \ Local
441       \ GlobalVar
443 let b:framescript_minlines = exists("framescript_minlines")
444                          \ ? framescript_minlines : 15
445 exec "syn sync ccomment framescriptComment minlines=" . b:framescript_minlines
447 hi def link framescriptTodo                 Todo
448 hi def link framescriptComment              Comment
449 hi def link framescriptCommentStart         framescriptComment
450 hi def link framescriptInclude              Include
451 hi def link framescriptIncluded             String
452 hi def link framescriptBoolean              Boolean
453 hi def link framescriptNumber               Number
454 hi def link framescriptInteger              framescriptNumber
455 hi def link framescriptReal                 framescriptNumber
456 hi def link framescriptMetric               framescriptNumber
457 hi def link framescriptCharacter            framescriptNumber
458 hi def link framescriptString               String
459 hi def link framescriptStringSpecialChar    SpecialChar
460 hi def link framescriptConstant             Constant
461 hi def link framescriptOperator             None
462 hi def link framescriptSessionVariables     PreProc
463 hi def link framescriptStructure            Structure
464 hi def link framescriptStatement            Statement
465 hi def link framescriptSubStatement         Type
466 hi def link framescriptApplySubStatement    framescriptSubStatement
467 hi def link framescriptClearSubStatement    framescriptSubStatement
468 hi def link framescriptCloseSubStatement    framescriptSubStatement
469 hi def link framescriptExecSubStatement     framescriptSubStatement
470 hi def link framescriptExecuteSubStatement  framescriptSubStatement
471 hi def link framescriptGenerateSubStatement framescriptSubStatement
472 hi def link framescriptGetSubStatement      framescriptSubStatement
473 hi def link framescriptImportSubStatement   framescriptSubStatement
474 hi def link framescriptInstallSubStatement  framescriptSubStatement
475 hi def link framescriptNewSubStatement      framescriptSubStatement
476 hi def link framescriptOpenSubStatement     framescriptSubStatement
477 hi def link framescriptPrintSubStatement    framescriptSubStatement
478 hi def link framescriptQuitSubStatement     framescriptSubStatement
479 hi def link framescriptRemoveSubStatement   framescriptSubStatement
480 hi def link framescriptSaveSubStatement     framescriptSubStatement
481 hi def link framescriptSelectSubStatement   framescriptSubStatement
482 hi def link framescriptStraddleSubStatement framescriptSubStatement
483 hi def link framescriptUpdateSubStatement   framescriptSubStatement
484 hi def link framescriptRepeat               Repeat
485 hi def link framescriptConditional          Conditional
486 hi def link framescriptType                 Type
488 let b:current_syntax = "framescript"
490 let &cpo = s:cpo_save
491 unlet s:cpo_save