annotate runtime/syntax/mgl.vim @ 7491:a924d469a0d7

Added tag v7.4.1047 for changeset 4a81ecde8701fb6019ff324fd3421b3494e041ca
author Christian Brabandt <cb@256bit.org>
date Mon, 04 Jan 2016 12:15:05 +0100
parents 7bc41231fbc7
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
680
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
1 " Vim syntax file
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
2 " Language: MGL
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
3 " Version: 1.0
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
4 " Last Change: 2006 Feb 21
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
5 " Maintainer: Gero Kuhlmann <gero@gkminix.han.de>
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
6 "
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 680
diff changeset
7 " $Id: mgl.vim,v 1.1 2006/02/21 22:08:20 vimboss Exp $
680
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
8 "
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
9 if version < 600
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
10 syntax clear
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
11 elseif exists("b:current_syntax")
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
12 finish
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
13 endif
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
14
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
15
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
16 syn sync lines=250
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
17
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
18 syn keyword mglBoolean true false
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
19 syn keyword mglConditional if else then
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
20 syn keyword mglConstant nil
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
21 syn keyword mglPredefined maxint
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
22 syn keyword mglLabel case goto label
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
23 syn keyword mglOperator to downto in of with
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
24 syn keyword mglOperator and not or xor div mod
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
25 syn keyword mglRepeat do for repeat while to until
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
26 syn keyword mglStatement procedure function break continue return restart
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
27 syn keyword mglStatement program begin end const var type
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
28 syn keyword mglStruct record
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
29 syn keyword mglType integer string char boolean char ipaddr array
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
30
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
31
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
32 " String
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
33 if !exists("mgl_one_line_string")
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
34 syn region mglString matchgroup=mglString start=+'+ end=+'+ contains=mglStringEscape
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
35 syn region mglString matchgroup=mglString start=+"+ end=+"+ contains=mglStringEscapeGPC
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
36 else
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
37 "wrong strings
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
38 syn region mglStringError matchgroup=mglStringError start=+'+ end=+'+ end=+$+ contains=mglStringEscape
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
39 syn region mglStringError matchgroup=mglStringError start=+"+ end=+"+ end=+$+ contains=mglStringEscapeGPC
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
40 "right strings
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
41 syn region mglString matchgroup=mglString start=+'+ end=+'+ oneline contains=mglStringEscape
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
42 syn region mglString matchgroup=mglString start=+"+ end=+"+ oneline contains=mglStringEscapeGPC
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
43 end
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
44 syn match mglStringEscape contained "''"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
45 syn match mglStringEscapeGPC contained '""'
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
46
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
47
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
48 if exists("mgl_symbol_operator")
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
49 syn match mglSymbolOperator "[+\-/*=\%]"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
50 syn match mglSymbolOperator "[<>]=\="
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
51 syn match mglSymbolOperator "<>"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
52 syn match mglSymbolOperator ":="
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
53 syn match mglSymbolOperator "[()]"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
54 syn match mglSymbolOperator "\.\."
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
55 syn match mglMatrixDelimiter "(."
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
56 syn match mglMatrixDelimiter ".)"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
57 syn match mglMatrixDelimiter "[][]"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
58 endif
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
59
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
60 syn match mglNumber "-\=\<\d\+\>"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
61 syn match mglHexNumber "\$[0-9a-fA-F]\+\>"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
62 syn match mglCharacter "\#[0-9]\+\>"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
63 syn match mglIpAddr "[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\>"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
64
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
65 syn region mglComment start="(\*" end="\*)"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
66 syn region mglComment start="{" end="}"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
67 syn region mglComment start="//" end="$"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
68
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
69 if !exists("mgl_no_functions")
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
70 syn keyword mglFunction dispose new
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
71 syn keyword mglFunction get load print select
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
72 syn keyword mglFunction odd pred succ
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
73 syn keyword mglFunction chr ord abs sqr
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
74 syn keyword mglFunction exit
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
75 syn keyword mglOperator at timeout
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
76 endif
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
77
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
78
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
79 syn region mglPreProc start="(\*\$" end="\*)"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
80 syn region mglPreProc start="{\$" end="}"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
81
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
82 syn keyword mglException try except raise
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
83 syn keyword mglPredefined exception
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
84
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
85
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
86 " Define the default highlighting.
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
87 " For version 5.7 and earlier: only when not done already
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
88 " For version 5.8 and later: only when an item doesn't have highlighting yet
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
89 if version >= 508 || !exists("did_mgl_syn_inits")
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
90 if version < 508
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
91 let did_mgl_syn_inits = 1
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
92 command -nargs=+ HiLink hi link <args>
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
93 else
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
94 command -nargs=+ HiLink hi def link <args>
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
95 endif
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
96
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
97 HiLink mglBoolean Boolean
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
98 HiLink mglComment Comment
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
99 HiLink mglConditional Conditional
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
100 HiLink mglConstant Constant
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
101 HiLink mglException Exception
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
102 HiLink mglFunction Function
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
103 HiLink mglLabel Label
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
104 HiLink mglMatrixDelimiter Identifier
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
105 HiLink mglNumber Number
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
106 HiLink mglHexNumber Number
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
107 HiLink mglCharacter Number
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
108 HiLink mglIpAddr Number
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
109 HiLink mglOperator Operator
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
110 HiLink mglPredefined mglFunction
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
111 HiLink mglPreProc PreProc
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
112 HiLink mglRepeat Repeat
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
113 HiLink mglStatement Statement
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
114 HiLink mglString String
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
115 HiLink mglStringEscape Special
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
116 HiLink mglStringEscapeGPC Special
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
117 HiLink mglStringError Error
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
118 HiLink mglStruct mglStatement
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
119 HiLink mglSymbolOperator mglOperator
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
120 HiLink mglType Type
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
121
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
122 delcommand HiLink
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
123 endif
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
124
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
125
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
126 let b:current_syntax = "mgl"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
127
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
128 " vim: ts=8 sw=2