annotate runtime/syntax/mgl.vim @ 21059:90872dbd2bfe

Added tag v8.2.1080 for changeset 111f877e63d96a2d6e7efeaa7f7555506a99ac9a
author Bram Moolenaar <Bram@vim.org>
date Sun, 28 Jun 2020 18:45:05 +0200
parents 46763b01cd9a
children
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 "
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
9 " quit when a syntax file was already loaded
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
10 if exists("b:current_syntax")
680
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
11 finish
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
12 endif
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
13
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
14
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
15 syn sync lines=250
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
16
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
17 syn keyword mglBoolean true false
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
18 syn keyword mglConditional if else then
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
19 syn keyword mglConstant nil
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
20 syn keyword mglPredefined maxint
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
21 syn keyword mglLabel case goto label
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
22 syn keyword mglOperator to downto in of with
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
23 syn keyword mglOperator and not or xor div mod
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
24 syn keyword mglRepeat do for repeat while to until
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
25 syn keyword mglStatement procedure function break continue return restart
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
26 syn keyword mglStatement program begin end const var type
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
27 syn keyword mglStruct record
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
28 syn keyword mglType integer string char boolean char ipaddr array
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
29
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
30
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
31 " String
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
32 if !exists("mgl_one_line_string")
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
33 syn region mglString matchgroup=mglString start=+'+ end=+'+ contains=mglStringEscape
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
34 syn region mglString matchgroup=mglString start=+"+ end=+"+ contains=mglStringEscapeGPC
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
35 else
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
36 "wrong strings
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
37 syn region mglStringError matchgroup=mglStringError start=+'+ end=+'+ end=+$+ contains=mglStringEscape
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
38 syn region mglStringError matchgroup=mglStringError start=+"+ end=+"+ end=+$+ contains=mglStringEscapeGPC
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
39 "right strings
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
40 syn region mglString matchgroup=mglString start=+'+ end=+'+ oneline contains=mglStringEscape
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
41 syn region mglString matchgroup=mglString start=+"+ end=+"+ oneline contains=mglStringEscapeGPC
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
42 end
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
43 syn match mglStringEscape contained "''"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
44 syn match mglStringEscapeGPC contained '""'
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
45
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
46
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
47 if exists("mgl_symbol_operator")
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
48 syn match mglSymbolOperator "[+\-/*=\%]"
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 mglMatrixDelimiter "(."
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 endif
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
58
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
59 syn match mglNumber "-\=\<\d\+\>"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
60 syn match mglHexNumber "\$[0-9a-fA-F]\+\>"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
61 syn match mglCharacter "\#[0-9]\+\>"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
62 syn match mglIpAddr "[0-9]\+\.[0-9]\+\.[0-9]\+\.[0-9]\+\>"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
63
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
64 syn region mglComment start="(\*" end="\*)"
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
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
68 if !exists("mgl_no_functions")
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
69 syn keyword mglFunction dispose new
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
70 syn keyword mglFunction get load print select
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
71 syn keyword mglFunction odd pred succ
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
72 syn keyword mglFunction chr ord abs sqr
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
73 syn keyword mglFunction exit
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
74 syn keyword mglOperator at timeout
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
75 endif
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
76
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
77
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
78 syn region mglPreProc start="(\*\$" end="\*)"
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
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
81 syn keyword mglException try except raise
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
82 syn keyword mglPredefined exception
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
83
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
84
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
85 " Define the default highlighting.
10048
43efa4f5a8ea commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
86 " Only when an item doesn't have highlighting yet
680
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
87
10051
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
88 hi def link mglBoolean Boolean
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
89 hi def link mglComment Comment
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
90 hi def link mglConditional Conditional
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
91 hi def link mglConstant Constant
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
92 hi def link mglException Exception
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
93 hi def link mglFunction Function
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
94 hi def link mglLabel Label
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
95 hi def link mglMatrixDelimiter Identifier
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
96 hi def link mglNumber Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
97 hi def link mglHexNumber Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
98 hi def link mglCharacter Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
99 hi def link mglIpAddr Number
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
100 hi def link mglOperator Operator
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
101 hi def link mglPredefined mglFunction
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
102 hi def link mglPreProc PreProc
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
103 hi def link mglRepeat Repeat
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
104 hi def link mglStatement Statement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
105 hi def link mglString String
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
106 hi def link mglStringEscape Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
107 hi def link mglStringEscapeGPC Special
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
108 hi def link mglStringError Error
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
109 hi def link mglStruct mglStatement
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
110 hi def link mglSymbolOperator mglOperator
46763b01cd9a commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents: 10048
diff changeset
111 hi def link mglType Type
680
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
112
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
113
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
114
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
115 let b:current_syntax = "mgl"
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
116
5b101ff9d4c4 updated for version 7.0203
vimboss
parents:
diff changeset
117 " vim: ts=8 sw=2