annotate runtime/syntax/ppwiz.vim @ 7246:a69b5e4beefd v7.4.931

commit https://github.com/vim/vim/commit/cfcd1ddd103129b309671cba5cff55e19a9908e4 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Nov 21 14:24:50 2015 +0100 patch 7.4.931 Problem: Test 94 fails on some systems. Solution: Set 'encoding' to utf-8.
author Christian Brabandt <cb@256bit.org>
date Sat, 21 Nov 2015 14:30:04 +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: PPWizard (preprocessor by Dennis Bareis)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Stefan Schwarzer <s.schwarzer@ndh.net>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " URL: http://www.ndh.net/home/sschwarzer/download/ppwiz.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Last Change: 2003 May 11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " Filename: ppwiz.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " Remove old syntax stuff
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 if !exists("ppwiz_highlight_defs")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 let ppwiz_highlight_defs = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 if !exists("ppwiz_with_html")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 let ppwiz_with_html = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match ppwizComment "^;.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match ppwizComment ";;.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " HTML
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 if ppwiz_with_html > 0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn region ppwizHTML start="<" end=">" contains=ppwizArg,ppwizMacro
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match ppwizHTML "\&\w\+;"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " define, evaluate etc.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 if ppwiz_highlight_defs == 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 syn match ppwizDef "^\s*\#\S\+\s\+\S\+" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 syn match ppwizDef "^\s*\#\(if\|else\|endif\)" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn match ppwizDef "^\s*\#\({\|break\|continue\|}\)" contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " elseif ppwiz_highlight_defs == 2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " syn region ppwizDef start="^\s*\#" end="[^\\]$" end="^$" keepend contains=ALL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn region ppwizDef start="^\s*\#" end="[^\\]$" end="^$" keepend contains=ppwizCont
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn match ppwizError "\s.\\$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn match ppwizCont "\s\([+\-%]\|\)\\$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " macros to execute
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn region ppwizMacro start="<\$" end=">" contains=@ppwizArgVal,ppwizCont
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 " macro arguments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn region ppwizArg start="{" end="}" contains=ppwizEqual,ppwizString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn match ppwizEqual "=" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn match ppwizOperator "<>\|=\|<\|>" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " standard variables (builtin)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn region ppwizStdVar start="<?[^?]" end=">" contains=@ppwizArgVal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " Rexx variables
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn region ppwizRexxVar start="<??" end=">" contains=@ppwizArgVal
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 " Constants
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn region ppwizString start=+"+ end=+"+ contained contains=ppwizMacro,ppwizArg,ppwizHTML,ppwizCont,ppwizStdVar,ppwizRexxVar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn region ppwizString start=+'+ end=+'+ contained contains=ppwizMacro,ppwizArg,ppwizHTML,ppwizCont,ppwizStdVar,ppwizRexxVar
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn match ppwizInteger "\d\+" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 " Clusters
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn cluster ppwizArgVal add=ppwizString,ppwizInteger
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 " 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
68 if version >= 508 || !exists("did_ppwiz_syn_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 let did_ppwiz_syn_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 HiLink ppwizSpecial Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 HiLink ppwizEqual ppwizSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 HiLink ppwizOperator ppwizSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 HiLink ppwizComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 HiLink ppwizDef PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 HiLink ppwizMacro Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 HiLink ppwizArg Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 HiLink ppwizStdVar Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 HiLink ppwizRexxVar Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 HiLink ppwizString Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 HiLink ppwizInteger Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 HiLink ppwizCont ppwizSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 HiLink ppwizError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 HiLink ppwizHTML Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 let b:current_syntax = "ppwiz"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 " vim: ts=4
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97