annotate runtime/syntax/elmfilt.vim @ 4813:bc3f4804cf47 v7.3.1153

updated for version 7.3.1153 Problem: New regexp engine: Some look-behind matches are very expensive. Solution: Pospone invisible matches further, until a match is almost found.
author Bram Moolenaar <bram@vim.org>
date Sun, 09 Jun 2013 16:24:45 +0200
parents e63691e7c504
children b3bc99b909c3
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: Elm Filter rules
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 507
diff changeset
4 " Last Change: Sep 11, 2006
e63691e7c504 updated for version 7.1a
vimboss
parents: 507
diff changeset
5 " Version: 5
507
a1059cda45f2 updated for version 7.0142
vimboss
parents: 7
diff changeset
6 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 syn cluster elmfiltIfGroup contains=elmfiltCond,elmfiltOper,elmfiltOperKey,,elmfiltNumber,elmfiltOperKey
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn match elmfiltParenError "[()]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn match elmfiltMatchError "/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn region elmfiltIf start="\<if\>" end="\<then\>" contains=elmfiltParen,elmfiltParenError skipnl skipwhite nextgroup=elmfiltAction
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn region elmfiltParen contained matchgroup=Delimiter start="(" matchgroup=Delimiter end=")" contains=elmfiltParen,@elmfiltIfGroup,elmfiltThenError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn region elmfiltMatch contained matchgroup=Delimiter start="/" skip="\\/" matchgroup=Delimiter end="/" skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 syn match elmfiltThenError "\<then.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match elmfiltComment "^#.*$" contains=@Spell
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword elmfiltAction contained delete execute executec forward forwardc leave save savecopy skipnl skipwhite nextgroup=elmfiltString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn match elmfiltArg contained "[^\\]%[&0-9dDhmrsSty&]"lc=1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match elmfiltOperKey contained "\<contains\>" skipnl skipwhite nextgroup=elmfiltString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn match elmfiltOperKey contained "\<matches\s" nextgroup=elmfiltMatch,elmfiltSpaceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword elmfiltCond contained cc bcc lines always subject sender from to lines received skipnl skipwhite nextgroup=elmfiltString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match elmfiltNumber contained "\d\+"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword elmfiltOperKey contained and not skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey,elmfiltString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn match elmfiltOper contained "\~" skipnl skipwhite nextgroup=elmfiltMatch
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn match elmfiltOper contained "<=\|>=\|!=\|<\|<\|=" skipnl skipwhite nextgroup=elmfiltString,elmfiltCond,elmfiltOperKey
1121
e63691e7c504 updated for version 7.1a
vimboss
parents: 507
diff changeset
36 syn region elmfiltString contained start='"' skip='"\(\\\\\)*\\["%]' end='"' contains=elmfiltArg skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey,@Spell
e63691e7c504 updated for version 7.1a
vimboss
parents: 507
diff changeset
37 syn region elmfiltString contained start="'" skip="'\(\\\\\)*\\['%]" end="'" contains=elmfiltArg skipnl skipwhite nextgroup=elmfiltOper,elmfiltOperKey,@Spell
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match elmfiltSpaceError contained "\s.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " 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
43 if version >= 508 || !exists("did_elmfilt_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 let did_elmfilt_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 HiLink elmfiltAction Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 HiLink elmfiltArg Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 HiLink elmfiltComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 HiLink elmfiltCond Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 HiLink elmfiltIf Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 HiLink elmfiltMatch Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 HiLink elmfiltMatchError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 HiLink elmfiltNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 HiLink elmfiltOper Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 HiLink elmfiltOperKey Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 HiLink elmfiltParenError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 HiLink elmfiltSpaceError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 HiLink elmfiltString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 HiLink elmfiltThenError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 let b:current_syntax = "elmfilt"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " vim: ts=9