2 " Language: T2 / ROCK Linux .desc
3 " Maintainer: René Rebe <rene@exactcode.de>, Piotr Esden-Tempski <esden@rocklinux.org>
4 " Last Change: 2006 Aug 14
6 " For version 5.x: Clear all syntax items
7 " For version 6.x: Quit when a syntax file was already loaded
10 elseif exists("b:current_syntax")
17 syn keyword descFlag DIETLIBC KAFFE JAIL NOPARALLEL FPIC-QUIRK LIBTOOL-WUIRK NO-LIBTOOL-FIX AUTOMAKE-QUIRK NO-AS-NEEDED NO-SSP KERNEL INIT LIBC CC CXX F77 KCC contained
18 syn keyword descLicense Unknown GPL LGPL FDL MIT BSD OpenSource Free-to-use Commercial contained
21 syn match descTag /^\[\(COPY\)\]/
22 syn match descTag /^\[\(I\|TITLE\)\]/
23 syn match descTag /^\[\(T\|TEXT\)\]/ contained
24 syn match descTag /^\[\(U\|URL\)\]/
25 syn match descTag /^\[\(A\|AUTHOR\)\]/
26 syn match descTag /^\[\(M\|MAINTAINER\)\]/
27 syn match descTag /^\[\(C\|CATEGORY\)\]/ contained
28 syn match descTag /^\[\(F\|FLAG\)\]/ contained
29 syn match descTag /^\[\(E\|DEP\|DEPENDENCY\)\]/
30 syn match descTag /^\[\(R\|ARCH\|ARCHITECTURE\)\]/
31 syn match descTag /^\[\(L\|LICENSE\)\]/ contained
32 syn match descTag /^\[\(S\|STATUS\)\]/
33 syn match descTag /^\[\(O\|CONF\)\]/
34 syn match descTag /^\[\(V\|VER\|VERSION\)\]/
35 syn match descTag /^\[\(P\|PRI\|PRIORITY\)\]/ nextgroup=descInstall skipwhite
36 syn match descTag /^\[\(D\|DOWN\|DOWNLOAD\)\]/ nextgroup=descSum skipwhite
39 syn match descUrl /\w\+:\/\/\S\+/
40 syn match descCategory /\w\+\/\w\+/ contained
41 syn match descEmail /<[\.A-Za-z0-9]\+@[\.A-Za-z0-9]\+>/
44 syn match descInstallX /X/ contained
45 syn match descInstallO /O/ contained
46 syn match descInstall /[OX]/ contained contains=descInstallX,descInstallO nextgroup=descStage skipwhite
47 syn match descDash /-/ contained
48 syn match descDigit /\d/ contained
49 syn match descStage /[\-0][\-1][\-2][\-3][\-4][\-5][\-6][\-7][\-8][\-9]/ contained contains=descDash,descDigit nextgroup=descCompilePriority skipwhite
50 syn match descCompilePriority /\d\{3}\.\d\{3}/ contained
53 syn match descSum /\d\+/ contained nextgroup=descTarball skipwhite
54 syn match descTarball /\S\+/ contained nextgroup=descUrl skipwhite
58 syn region descText start=/^\[\(T\|TEXT\)\]/ end=/$/ contains=descTag,descUrl,descEmail
60 syn region descTagRegion start=/^\[\(C\|CATEGORY\)\]/ end=/$/ contains=descTag,descCategory
62 syn region descTagRegion start=/^\[\(F\|FLAG\)\]/ end=/$/ contains=descTag,descFlag
64 syn region descTagRegion start=/^\[\(L\|LICENSE\)\]/ end=/$/ contains=descTag,descLicense
66 " For version 5.7 and earlier: only when not done already
67 " Define the default highlighting.
68 " For version 5.8 and later: only when an item doesn't have highlighting yet
69 if version >= 508 || !exists("did_desc_syntax_inits")
71 let did_desc_syntax_inits = 1
72 command -nargs=+ HiLink hi link <args>
74 command -nargs=+ HiLink hi def link <args>
77 HiLink descFlag Identifier
78 HiLink descLicense Identifier
79 HiLink descCategory Identifier
82 HiLink descUrl Underlined
83 HiLink descEmail Underlined
86 HiLink descInstallX Boolean
87 HiLink descInstallO Type
88 HiLink descDash Operator
89 HiLink descDigit Number
90 HiLink descCompilePriority Number
94 HiLink descTarball Underlined
97 HiLink descText Comment
102 let b:current_syntax = "desc"