codekingpro/portable-devtools
114k
1" Vim syntax file2" Language: Software Distributor product specification file3" (POSIX 1387.2-1995).4" Maintainer: Rex Barzee <rex_barzee@hp.com>5" Last change: 25 Apr 20016 7" quit when a syntax file was already loaded8if exists("b:current_syntax")9 finish10endif11 12" Product specification files are case sensitive13syn case match14 15syn keyword psfObject bundle category control_file depot distribution16syn keyword psfObject end file fileset host installed_software media17syn keyword psfObject product root subproduct vendor18 19syn match psfUnquotString +[^"# ][^#]*+ contained20syn region psfQuotString start=+"+ skip=+\\"+ end=+"+ contained21 22syn match psfObjTag "\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*" contained23syn match psfAttAbbrev ",\<\(fa\|fr\|[aclqrv]\)\(<\|>\|<=\|>=\|=\|==\)[^,]\+" contained24syn match psfObjTags "\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*\(\s\+\<[-_+A-Z0-9a-z]\+\(\.[-_+A-Z0-9a-z]\+\)*\)*" contained25 26syn match psfNumber "\<\d\+\>" contained27syn match psfFloat "\<\d\+\>\(\.\<\d\+\>\)*" contained28 29syn match psfLongDate "\<\d\d\d\d\d\d\d\d\d\d\d\d\.\d\d\>" contained30 31syn keyword psfState available configured corrupt installed transient contained32syn keyword psfPState applied committed superseded contained33 34syn keyword psfBoolean false true contained35 36 37"Some of the attributes covered by attUnquotString and attQuotString:38" architecture category_tag control_directory copyright39" create_date description directory file_permissions install_source40" install_type location machine_type mod_date number os_name os_release41" os_version pose_as_os_name pose_as_os_release readme revision42" share_link title vendor_tag43syn region psfAttUnquotString matchgroup=psfAttrib start=~^\s*[^# ]\+\s\+[^#" ]~rs=e-1 contains=psfUnquotString,psfComment end=~$~ keepend oneline44 45syn region psfAttQuotString matchgroup=psfAttrib start=~^\s*[^# ]\+\s\+"~rs=e-1 contains=psfQuotString,psfComment skip=~\\"~ matchgroup=psfQuotString end=~"~ keepend46 47 48" These regions are defined in attempt to do syntax checking for some49" of the attributes.50syn region psfAttTag matchgroup=psfAttrib start="^\s*tag\s\+" contains=psfObjTag,psfComment end="$" keepend oneline51 52syn 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="$" keepend53 54syn region psfAttTags matchgroup=psfAttrib start="^\s*all_filesets\s\+" contains=psfObjTags,psfComment end="$" keepend55 56syn region psfAttNumber matchgroup=psfAttrib start="^\s*\(compressed_size\|instance_id\|media_sequence_number\|sequence_number\|size\)\s\+" contains=psfNumber,psfComment end="$" keepend oneline57 58syn region psfAttTime matchgroup=psfAttrib start="^\s*\(create_time\|ctime\|mod_time\|mtime\|timestamp\)\s\+" contains=psfNumber,psfComment end="$" keepend oneline59 60syn region psfAttFloat matchgroup=psfAttrib start="^\s*\(data_model_revision\|layout_version\)\s\+" contains=psfFloat,psfComment end="$" keepend oneline61 62syn region psfAttLongDate matchgroup=psfAttrib start="^\s*install_date\s\+" contains=psfLongDate,psfComment end="$" keepend oneline63 64syn region psfAttState matchgroup=psfAttrib start="^\s*\(state\)\s\+" contains=psfState,psfComment end="$" keepend oneline65 66syn region psfAttPState matchgroup=psfAttrib start="^\s*\(patch_state\)\s\+" contains=psfPState,psfComment end="$" keepend oneline67 68syn 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 oneline69 70syn match psfComment "#.*$"71 72 73" Define the default highlighting.74" Only when an item doesn't have highlighting yet75 76hi def link psfObject Statement77hi def link psfAttrib Type78hi def link psfQuotString String79hi def link psfObjTag Identifier80hi def link psfAttAbbrev PreProc81hi def link psfObjTags Identifier82 83hi def link psfComment Comment84 85 86" Long descriptions and copyrights confuse the syntax highlighting, so87" force vim to backup at least 100 lines before the top visible line88" looking for a sync location.89syn sync lines=10090 91let b:current_syntax = "psf"92 