annotate runtime/syntax/psf.vim @ 7444:045cd3a3a7ae

Added tag v7.4.1025 for changeset 357b7bd8d6125c81cc5c2be482902cb8bb753751
author Christian Brabandt <cb@256bit.org>
date Sat, 02 Jan 2016 15:45: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: Software Distributor product specification file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " (POSIX 1387.2-1995).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Maintainer: Rex Barzee <rex_barzee@hp.com>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Last change: 25 Apr 2001
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " Remove any old syntax stuff hanging around
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syn clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " Product specification files are case sensitive
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn case match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn keyword psfObject bundle category control_file depot distribution
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 syn keyword psfObject end file fileset host installed_software media
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 syn keyword psfObject product root subproduct vendor
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 syn match psfUnquotString +[^"# ][^#]*+ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn region psfQuotString start=+"+ skip=+\\"+ end=+"+ contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match psfObjTag "\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 syn match psfAttAbbrev ",\<\(fa\|fr\|[aclqrv]\)\(<\|>\|<=\|>=\|=\|==\)[^,]\+" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match psfObjTags "\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*\(\s\+\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*\)*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn match psfNumber "\<\d\+\>" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn match psfFloat "\<\d\+\>\(\.\<\d\+\>\)*" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn match psfLongDate "\<\d\d\d\d\d\d\d\d\d\d\d\d\.\d\d\>" contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword psfState available configured corrupt installed transient contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword psfPState applied committed superseded contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword psfBoolean false true contained
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 "Some of the attributes covered by attUnquotString and attQuotString:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 " architecture category_tag control_directory copyright
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 " create_date description directory file_permissions install_source
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 " install_type location machine_type mod_date number os_name os_release
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 " os_version pose_as_os_name pose_as_os_release readme revision
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 " share_link title vendor_tag
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn region psfAttUnquotString matchgroup=psfAttrib start=~^\s*[^# ]\+\s\+[^#" ]~rs=e-1 contains=psfUnquotString,psfComment end=~$~ keepend oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 syn region psfAttQuotString matchgroup=psfAttrib start=~^\s*[^# ]\+\s\+"~rs=e-1 contains=psfQuotString,psfComment skip=~\\"~ matchgroup=psfQuotString end=~"~ keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " These regions are defined in attempt to do syntax checking for some
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 " of the attributes.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn region psfAttTag matchgroup=psfAttrib start="^\s*tag\s\+" contains=psfObjTag,psfComment end="$" keepend oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn region psfAttSpec matchgroup=psfAttrib start="^\s*\(ancestor\|applied_patches\|applied_to\|contents\|corequisites\|exrequisites\|prerequisites\|software_spec\|supersedes\|superseded_by\)\s\+" contains=psfObjTag,psfAttAbbrev,psfComment end="$" keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn region psfAttTags matchgroup=psfAttrib start="^\s*all_filesets\s\+" contains=psfObjTags,psfComment end="$" keepend
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn region psfAttNumber matchgroup=psfAttrib start="^\s*\(compressed_size\|instance_id\|media_sequence_number\|sequence_number\|size\)\s\+" contains=psfNumber,psfComment end="$" keepend oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syn region psfAttTime matchgroup=psfAttrib start="^\s*\(create_time\|ctime\|mod_time\|mtime\|timestamp\)\s\+" contains=psfNumber,psfComment end="$" keepend oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn region psfAttFloat matchgroup=psfAttrib start="^\s*\(data_model_revision\|layout_version\)\s\+" contains=psfFloat,psfComment end="$" keepend oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn region psfAttLongDate matchgroup=psfAttrib start="^\s*install_date\s\+" contains=psfLongDate,psfComment end="$" keepend oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn region psfAttState matchgroup=psfAttrib start="^\s*\(state\)\s\+" contains=psfState,psfComment end="$" keepend oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn region psfAttPState matchgroup=psfAttrib start="^\s*\(patch_state\)\s\+" contains=psfPState,psfComment end="$" keepend oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn region psfAttBoolean matchgroup=psfAttrib start="^\s*\(is_kernel\|is_locatable\|is_patch\|is_protected\|is_reboot\|is_reference\|is_secure\|is_sparse\)\s\+" contains=psfBoolean,psfComment end="$" keepend oneline
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn match psfComment "#.*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 " 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
78 if version >= 508 || !exists("did_psf_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 let did_psf_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 HiLink psfObject Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 HiLink psfAttrib Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 HiLink psfQuotString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 HiLink psfObjTag Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 HiLink psfAttAbbrev PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 HiLink psfObjTags Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 HiLink psfComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 delcommand HiLink
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 " Long descriptions and copyrights confuse the syntax highlighting, so
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 " force vim to backup at least 100 lines before the top visible line
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 " looking for a sync location.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn sync lines=100
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 let b:current_syntax = "psf"