2 " Language: pilrc - a resource compiler for Palm OS development
3 " Maintainer: Brian Schau <brian@schau.com>
4 " Last change: 2003 May 11
5 " Available on: http://www.schau.com/pilrcvim/pilrc.vim
7 " Remove any old syntax
10 elseif exists("b:current_syntax")
16 " Notes: TRANSPARENT, FONT and FONT ID are defined in the specials
17 " section below. Beware of the order of the specials!
18 " Look in the syntax.txt and usr_27.txt files in vim\vim{version}\doc
19 " directory for regexps etc.
22 syn keyword pilrcKeyword ALERT APPLICATION APPLICATIONICONNAME AREA
23 syn keyword pilrcKeyword BITMAP BITMAPCOLOR BITMAPCOLOR16 BITMAPCOLOR16K
24 syn keyword pilrcKeyword BITMAPFAMILY BITMAPFAMILYEX BITMAPFAMILYSPECIAL
25 syn keyword pilrcKeyword BITMAPGREY BITMAPGREY16 BITMAPSCREENFAMILY
26 syn keyword pilrcKeyword BOOTSCREENFAMILY BUTTON BUTTONS BYTELIST
27 syn keyword pilrcKeyword CATEGORIES CHECKBOX COUNTRYLOCALISATION
28 syn keyword pilrcKeyword DATA
29 syn keyword pilrcKeyword FEATURE FIELD FONTINDEX FORM FORMBITMAP
30 syn keyword pilrcKeyword GADGET GENERATEHEADER
31 syn keyword pilrcKeyword GRAFFITIINPUTAREA GRAFFITISTATEINDICATOR
32 syn keyword pilrcKeyword HEX
33 syn keyword pilrcKeyword ICON ICONFAMILY ICONFAMILYEX INTEGER
34 syn keyword pilrcKeyword KEYBOARD
35 syn keyword pilrcKeyword LABEL LAUNCHERCATEGORY LIST LONGWORDLIST
36 syn keyword pilrcKeyword MENU MENUITEM MESSAGE MIDI
37 syn keyword pilrcKeyword PALETTETABLE POPUPLIST POPUPTRIGGER
38 syn keyword pilrcKeyword PULLDOWN PUSHBUTTON
39 syn keyword pilrcKeyword REPEATBUTTON RESETAUTOID
40 syn keyword pilrcKeyword SCROLLBAR SELECTORTRIGGER SLIDER SMALLICON
41 syn keyword pilrcKeyword SMALLICONFAMILY SMALLICONFAMILYEX STRING STRINGTABLE
42 syn keyword pilrcKeyword TABLE TITLE TRANSLATION TRAP
43 syn keyword pilrcKeyword VERSION
44 syn keyword pilrcKeyword WORDLIST
47 syn keyword pilrcType AT AUTOSHIFT
48 syn keyword pilrcType BACKGROUNDID BITMAPID BOLDFRAME BPP
49 syn keyword pilrcType CHECKED COLORTABLE COLUMNS COLUMNWIDTHS COMPRESS
50 syn keyword pilrcType COMPRESSBEST COMPRESSPACKBITS COMPRESSRLE COMPRESSSCANLINE
51 syn keyword pilrcType CONFIRMATION COUNTRY CREATOR CURRENCYDECIMALPLACES
52 syn keyword pilrcType CURRENCYNAME CURRENCYSYMBOL CURRENCYUNIQUESYMBOL
53 syn keyword pilrcType DATEFORMAT DAYLIGHTSAVINGS DEFAULTBTNID DEFAULTBUTTON
54 syn keyword pilrcType DENSITY DISABLED DYNAMICSIZE
55 syn keyword pilrcType EDITABLE ENTRY ERROR EXTENDED
56 syn keyword pilrcType FEEDBACK FILE FONTID FORCECOMPRESS FRAME
57 syn keyword pilrcType GRAFFITI GRAPHICAL GROUP
58 syn keyword pilrcType HASSCROLLBAR HELPID
59 syn keyword pilrcType ID INDEX INFORMATION
60 syn keyword pilrcType KEYDOWNCHR KEYDOWNKEYCODE KEYDOWNMODIFIERS
61 syn keyword pilrcType LANGUAGE LEFTALIGN LEFTANCHOR LONGDATEFORMAT
62 syn keyword pilrcType MAX MAXCHARS MEASUREMENTSYSTEM MENUID MIN LOCALE
63 syn keyword pilrcType MINUTESWESTOFGMT MODAL MULTIPLELINES
64 syn keyword pilrcType NAME NOCOLORTABLE NOCOMPRESS NOFRAME NONEDITABLE
65 syn keyword pilrcType NONEXTENDED NONUSABLE NOSAVEBEHIND NUMBER NUMBERFORMAT
66 syn keyword pilrcType NUMERIC
67 syn keyword pilrcType PAGESIZE
68 syn keyword pilrcType RECTFRAME RIGHTALIGN RIGHTANCHOR ROWS
69 syn keyword pilrcType SAVEBEHIND SEARCH SCREEN SELECTEDBITMAPID SINGLELINE
70 syn keyword pilrcType THUMBID TRANSPARENTINDEX TIMEFORMAT
71 syn keyword pilrcType UNDERLINED USABLE
72 syn keyword pilrcType VALUE VERTICAL VISIBLEITEMS
73 syn keyword pilrcType WARNING WEEKSTARTDAY
76 syn keyword pilrcCountry Australia Austria Belgium Brazil Canada Denmark
77 syn keyword pilrcCountry Finland France Germany HongKong Iceland Indian
78 syn keyword pilrcCountry Indonesia Ireland Italy Japan Korea Luxembourg Malaysia
79 syn keyword pilrcCountry Mexico Netherlands NewZealand Norway Philippines
80 syn keyword pilrcCountry RepChina Singapore Spain Sweden Switzerland Thailand
81 syn keyword pilrcCountry Taiwan UnitedKingdom UnitedStates
84 syn keyword pilrcLanguage English French German Italian Japanese Spanish
87 syn match pilrcString "\"[^"]*\""
90 syn match pilrcNumber "\<0x\x\+\>"
91 syn match pilrcNumber "\<\d\+\>"
94 syn region pilrcComment start="/\*" end="\*/"
95 syn region pilrcComment start="//" end="$"
98 syn keyword pilrcConstant AUTO AUTOID BOTTOM CENTER PREVBOTTOM PREVHEIGHT
99 syn keyword pilrcConstant PREVLEFT PREVRIGHT PREVTOP PREVWIDTH RIGHT
100 syn keyword pilrcConstant SEPARATOR
103 syn match pilrcIdentifier "\<\h\w*\>"
106 syn match pilrcType "\<FONT\>"
107 syn match pilrcKeyword "\<FONT\>\s*\<ID\>"
108 syn match pilrcType "\<TRANSPARENT\>"
111 syn keyword pilrcFunction BEGIN END
114 syn match pilrcInclude "\#include"
115 syn match pilrcInclude "\#define"
116 syn keyword pilrcInclude equ
117 syn keyword pilrcInclude package
118 syn region pilrcInclude start="public class" end="}"
120 syn sync ccomment pilrcComment
122 if version >= 508 || !exists("did_pilrc_syntax_inits")
124 command -nargs=+ HiLink hi link <args>
126 command -nargs=+ HiLink hi def link <args>
129 let did_pilrc_syntax_inits = 1
131 " The default methods for highlighting
132 HiLink pilrcKeyword Statement
133 HiLink pilrcType Type
134 HiLink pilrcError Error
135 HiLink pilrcCountry SpecialChar
136 HiLink pilrcLanguage SpecialChar
137 HiLink pilrcString SpecialChar
138 HiLink pilrcNumber Number
139 HiLink pilrcComment Comment
140 HiLink pilrcConstant Constant
141 HiLink pilrcFunction Function
142 HiLink pilrcInclude SpecialChar
143 HiLink pilrcIdentifier Number
148 let b:current_syntax = "pilrc"