annotate runtime/syntax/lace.vim @ 7785:9420058dfec6

Added tag v7.4.1189 for changeset 29d4ee3f009a440ba9c9aac5a42536a7fcf0055e
author Christian Brabandt <cb@256bit.org>
date Thu, 28 Jan 2016 15:15:05 +0100
parents 3fc0f57ecb91
children 43efa4f5a8ea
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim syntax file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: lace
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Jocelyn Fiat <utilities@eiffel.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last Change: 2001 May 09
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Copyright Interactive Software Engineering, 1998
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " You are free to use this file as you please, but
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " if you make a change or improvement you must send
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " it to the maintainer at <utilities@eiffel.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " LACE is case insensitive, but the style guide lines are not.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 if !exists("lace_case_insensitive")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " A bunch of useful LACE keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword laceTopStruct system root default option visible cluster
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword laceTopStruct external generate end
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword laceOptionClause collect assertion debug optimize trace
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword laceOptionClause profile inline precompiled multithreaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword laceOptionClause exception_trace dead_code_removal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword laceOptionClause array_optimization
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword laceOptionClause inlining_size inlining
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword laceOptionClause console_application dynamic_runtime
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn keyword laceOptionClause line_generation
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn keyword laceOptionMark yes no all
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword laceOptionMark require ensure invariant loop check
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword laceClusterProp use include exclude
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword laceAdaptClassName adapt ignore rename as
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword laceAdaptClassName creation export visible
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword laceExternal include_path object makefile
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " Operators
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match laceOperator "\$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn match laceBrackets "[[\]]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn match laceExport "[{}]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " Constants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword laceBool true false
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword laceBool True False
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 syn region laceString start=+"+ skip=+%"+ end=+"+ contains=laceEscape,laceStringError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn match laceEscape contained "%[^/]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn match laceEscape contained "%/\d\+/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn match laceEscape contained "^[ \t]*%"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn match laceEscape contained "%[ \t]*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn match laceStringError contained "%/[^0-9]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn match laceStringError contained "%/\d\+[^0-9/]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match laceStringError "'\(%[^/]\|%/\d\+/\|[^'%]\)\+'"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn match laceCharacter "'\(%[^/]\|%/\d\+/\|[^'%]\)'" contains=laceEscape
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn match laceNumber "-\=\<\d\+\(_\d\+\)*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match laceNumber "\<[01]\+[bB]\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn match laceNumber "-\=\<\d\+\(_\d\+\)*\.\(\d\+\(_\d\+\)*\)\=\([eE][-+]\=\d\+\(_\d\+\)*\)\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 syn match laceNumber "-\=\.\d\+\(_\d\+\)*\([eE][-+]\=\d\+\(_\d\+\)*\)\="
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn match laceComment "--.*" contains=laceTodo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 " Case sensitive stuff
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn keyword laceTodo TODO XXX FIXME
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn match laceClassName "\<[A-Z][A-Z0-9_]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn match laceCluster "[a-zA-Z][a-zA-Z0-9_]*\s*:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn match laceCluster "[a-zA-Z][a-zA-Z0-9_]*\s*(\s*[a-zA-Z][a-zA-Z0-9_]*\s*)\s*:"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 " Catch mismatched parentheses
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn match laceParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn match laceBracketError "\]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn region laceGeneric transparent matchgroup=laceBrackets start="\[" end="\]" contains=ALLBUT,laceBracketError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn region laceParen transparent start="(" end=")" contains=ALLBUT,laceParenError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 " Should suffice for even very long strings and expressions
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn sync lines=40
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 if version >= 508 || !exists("did_lace_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 let did_lace_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 HiLink laceTopStruct PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 HiLink laceOptionClause Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 HiLink laceOptionMark Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102 HiLink laceClusterProp Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 HiLink laceAdaptClassName Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 HiLink laceExternal Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 HiLink laceCluster ModeMsg
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 HiLink laceEscape Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 HiLink laceBool Boolean
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 HiLink laceString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 HiLink laceCharacter Character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 HiLink laceClassName Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 HiLink laceNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115 HiLink laceOperator Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 HiLink laceArray Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 HiLink laceExport Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 HiLink laceCreation Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 HiLink laceBrackets Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 HiLink laceConstraint Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 HiLink laceComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 HiLink laceError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 HiLink laceStringError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 HiLink laceParenError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 HiLink laceBracketError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 HiLink laceTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 let b:current_syntax = "lace"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 " vim: ts=4