blob: fddfe4c947598876c551b5e3a5f01472f654d39e [file] [log] [blame]
Bram Moolenaar071d4272004-06-13 20:20:40 +00001" Vim syntax file
2" Language: PostScript - all Levels, selectable
3" Maintainer: Mike Williams <mrw@eandem.co.uk>
4" Filenames: *.ps,*.eps
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +00005" Last Change: 31st October 2007
6" URL: http://www.eandem.co.uk/mrw/vim
Bram Moolenaar071d4272004-06-13 20:20:40 +00007"
8" Options Flags:
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +00009" postscr_level - language level to use for highligting (1, 2, or 3)
10" postscr_display - include display PS operators
11" postscr_ghostscript - include GS extensions
12" postscr_fonts - highlight standard font names (a lot for PS 3)
13" postscr_encodings - highlight encoding names (there are a lot)
14" postscr_andornot_binary - highlight and, or, and not as binary operators (not logical)
Bram Moolenaar071d4272004-06-13 20:20:40 +000015"
16" For version 5.x: Clear all syntax items
17" For version 6.x: Quit when a syntax file was already loaded
18if version < 600
19 syntax clear
20elseif exists("b:current_syntax")
21 finish
22endif
23
24" PostScript is case sensitive
25syn case match
26
27" Keyword characters - all 7-bit ASCII bar PS delimiters and ws
28if version >= 600
29 setlocal iskeyword=33-127,^(,^),^<,^>,^[,^],^{,^},^/,^%
30else
31 set iskeyword=33-127,^(,^),^<,^>,^[,^],^{,^},^/,^%
32endif
33
34" Yer trusty old TODO highlghter!
35syn keyword postscrTodo contained TODO
36
37" Comment
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +000038syn match postscrComment "%.*$" contains=postscrTodo,@Spell
Bram Moolenaar071d4272004-06-13 20:20:40 +000039" DSC comment start line (NB: defines DSC level, not PS level!)
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +000040syn match postscrDSCComment "^%!PS-Adobe-\d\+\.\d\+\s*.*$"
Bram Moolenaar071d4272004-06-13 20:20:40 +000041" DSC comment line (no check on possible comments - another language!)
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +000042syn match postscrDSCComment "^%%\u\+.*$" contains=@postscrString,@postscrNumber,@Spell
Bram Moolenaar071d4272004-06-13 20:20:40 +000043" DSC continuation line (no check that previous line is DSC comment)
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +000044syn match postscrDSCComment "^%%+ *.*$" contains=@postscrString,@postscrNumber,@Spell
Bram Moolenaar071d4272004-06-13 20:20:40 +000045
46" Names
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +000047syn match postscrName "\k\+"
Bram Moolenaar071d4272004-06-13 20:20:40 +000048
49" Identifiers
50syn match postscrIdentifierError "/\{1,2}[[:space:]\[\]{}]"me=e-1
51syn match postscrIdentifier "/\{1,2}\k\+" contains=postscrConstant,postscrBoolean,postscrCustConstant
52
53" Numbers
54syn case ignore
55" In file hex data - usually complete lines
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +000056syn match postscrHex "^[[:xdigit:]][[:xdigit:][:space:]]*$"
57"syn match postscrHex "\<\x\{2,}\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +000058" Integers
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +000059syn match postscrInteger "\<[+-]\=\d\+\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +000060" Radix
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +000061syn match postscrRadix "\d\+#\x\+\>"
Bram Moolenaar071d4272004-06-13 20:20:40 +000062" Reals - upper and lower case e is allowed
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +000063syn match postscrFloat "[+-]\=\d\+\.\>"
64syn match postscrFloat "[+-]\=\d\+\.\d*\(e[+-]\=\d\+\)\=\>"
65syn match postscrFloat "[+-]\=\.\d\+\(e[+-]\=\d\+\)\=\>"
66syn match postscrFloat "[+-]\=\d\+e[+-]\=\d\+\>"
67syn cluster postscrNumber contains=postscrInteger,postscrRadix,postscrFloat
Bram Moolenaar071d4272004-06-13 20:20:40 +000068syn case match
69
70" Escaped characters
71syn match postscrSpecialChar contained "\\[nrtbf\\()]"
72syn match postscrSpecialCharError contained "\\[^nrtbf\\()]"he=e-1
73" Escaped octal characters
74syn match postscrSpecialChar contained "\\\o\{1,3}"
75
76" Strings
77" ASCII strings
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +000078syn region postscrASCIIString start=+(+ end=+)+ skip=+([^)]*)+ contains=postscrSpecialChar,postscrSpecialCharError,@Spell
79syn match postscrASCIIStringError ")"
Bram Moolenaar071d4272004-06-13 20:20:40 +000080" Hex strings
81syn match postscrHexCharError contained "[^<>[:xdigit:][:space:]]"
82syn region postscrHexString start=+<\($\|[^<]\)+ end=+>+ contains=postscrHexCharError
83syn match postscrHexString "<>"
84" ASCII85 strings
85syn match postscrASCII85CharError contained "[^<>\~!-uz[:space:]]"
86syn region postscrASCII85String start=+<\~+ end=+\~>+ contains=postscrASCII85CharError
87syn cluster postscrString contains=postscrASCIIString,postscrHexString,postscrASCII85String
88
89
90" Set default highlighting to level 2 - most common at the moment
91if !exists("postscr_level")
92 let postscr_level = 2
93endif
94
95
96" PS level 1 operators - common to all levels (well ...)
97
98" Stack operators
99syn keyword postscrOperator pop exch dup copy index roll clear count mark cleartomark counttomark
100
101" Math operators
102syn keyword postscrMathOperator add div idiv mod mul sub abs neg ceiling floor round truncate sqrt atan cos
103syn keyword postscrMathOperator sin exp ln log rand srand rrand
104
105" Array operators
106syn match postscrOperator "[\[\]{}]"
107syn keyword postscrOperator array length get put getinterval putinterval astore aload copy
108syn keyword postscrRepeat forall
109
110" Dictionary operators
111syn keyword postscrOperator dict maxlength begin end def load store known where currentdict
112syn keyword postscrOperator countdictstack dictstack cleardictstack internaldict
113syn keyword postscrConstant $error systemdict userdict statusdict errordict
114
115" String operators
116syn keyword postscrOperator string anchorsearch search token
117
118" Logic operators
119syn keyword postscrLogicalOperator eq ne ge gt le lt and not or
120if exists("postscr_andornot_binaryop")
121 syn keyword postscrBinaryOperator and or not
122else
123 syn keyword postscrLogicalOperator and not or
124endif
125syn keyword postscrBinaryOperator xor bitshift
126syn keyword postscrBoolean true false
127
128" PS Type names
129syn keyword postscrConstant arraytype booleantype conditiontype dicttype filetype fonttype gstatetype
130syn keyword postscrConstant integertype locktype marktype nametype nulltype operatortype
131syn keyword postscrConstant packedarraytype realtype savetype stringtype
132
133" Control operators
134syn keyword postscrConditional if ifelse
135syn keyword postscrRepeat for repeat loop
136syn keyword postscrOperator exec exit stop stopped countexecstack execstack quit
137syn keyword postscrProcedure start
138
139" Object operators
140syn keyword postscrOperator type cvlit cvx xcheck executeonly noaccess readonly rcheck wcheck cvi cvn cvr
141syn keyword postscrOperator cvrs cvs
142
143" File operators
144syn keyword postscrOperator file closefile read write readhexstring writehexstring readstring writestring
145syn keyword postscrOperator bytesavailable flush flushfile resetfile status run currentfile print
146syn keyword postscrOperator stack pstack readline deletefile setfileposition fileposition renamefile
147syn keyword postscrRepeat filenameforall
148syn keyword postscrProcedure = ==
149
150" VM operators
151syn keyword postscrOperator save restore
152
153" Misc operators
154syn keyword postscrOperator bind null usertime executive echo realtime
155syn keyword postscrConstant product revision serialnumber version
156syn keyword postscrProcedure prompt
157
158" GState operators
159syn keyword postscrOperator gsave grestore grestoreall initgraphics setlinewidth setlinecap currentgray
160syn keyword postscrOperator currentlinejoin setmiterlimit currentmiterlimit setdash currentdash setgray
161syn keyword postscrOperator sethsbcolor currenthsbcolor setrgbcolor currentrgbcolor currentlinewidth
162syn keyword postscrOperator currentlinecap setlinejoin setcmykcolor currentcmykcolor
163
164" Device gstate operators
165syn keyword postscrOperator setscreen currentscreen settransfer currenttransfer setflat currentflat
166syn keyword postscrOperator currentblackgeneration setblackgeneration setundercolorremoval
167syn keyword postscrOperator setcolorscreen currentcolorscreen setcolortransfer currentcolortransfer
168syn keyword postscrOperator currentundercolorremoval
169
170" Matrix operators
171syn keyword postscrOperator matrix initmatrix identmatrix defaultmatrix currentmatrix setmatrix translate
172syn keyword postscrOperator concat concatmatrix transform dtransform itransform idtransform invertmatrix
173syn keyword postscrOperator scale rotate
174
175" Path operators
176syn keyword postscrOperator newpath currentpoint moveto rmoveto lineto rlineto arc arcn arcto curveto
177syn keyword postscrOperator closepath flattenpath reversepath strokepath charpath clippath pathbbox
178syn keyword postscrOperator initclip clip eoclip rcurveto
179syn keyword postscrRepeat pathforall
180
181" Painting operators
182syn keyword postscrOperator erasepage fill eofill stroke image imagemask colorimage
183
184" Device operators
185syn keyword postscrOperator showpage copypage nulldevice
186
187" Character operators
188syn keyword postscrProcedure findfont
189syn keyword postscrConstant FontDirectory ISOLatin1Encoding StandardEncoding
190syn keyword postscrOperator definefont scalefont makefont setfont currentfont show ashow
191syn keyword postscrOperator stringwidth kshow setcachedevice
192syn keyword postscrOperator setcharwidth widthshow awidthshow findencoding cshow rootfont setcachedevice2
193
194" Interpreter operators
195syn keyword postscrOperator vmstatus cachestatus setcachelimit
196
197" PS constants
198syn keyword postscrConstant contained Gray Red Green Blue All None DeviceGray DeviceRGB
199
200" PS Filters
201syn keyword postscrConstant contained ASCIIHexDecode ASCIIHexEncode ASCII85Decode ASCII85Encode LZWDecode
202syn keyword postscrConstant contained RunLengthDecode RunLengthEncode SubFileDecode NullEncode
203syn keyword postscrConstant contained GIFDecode PNGDecode LZWEncode
204
205" PS JPEG filter dictionary entries
206syn keyword postscrConstant contained DCTEncode DCTDecode Colors HSamples VSamples QuantTables QFactor
207syn keyword postscrConstant contained HuffTables ColorTransform
208
209" PS CCITT filter dictionary entries
210syn keyword postscrConstant contained CCITTFaxEncode CCITTFaxDecode Uncompressed K EndOfLine
211syn keyword postscrConstant contained Columns Rows EndOfBlock Blacks1 DamagedRowsBeforeError
212syn keyword postscrConstant contained EncodedByteAlign
213
214" PS Form dictionary entries
215syn keyword postscrConstant contained FormType XUID BBox Matrix PaintProc Implementation
216
217" PS Errors
218syn keyword postscrProcedure handleerror
219syn keyword postscrConstant contained configurationerror dictfull dictstackunderflow dictstackoverflow
220syn keyword postscrConstant contained execstackoverflow interrupt invalidaccess
221syn keyword postscrConstant contained invalidcontext invalidexit invalidfileaccess invalidfont
222syn keyword postscrConstant contained invalidid invalidrestore ioerror limitcheck nocurrentpoint
223syn keyword postscrConstant contained rangecheck stackoverflow stackunderflow syntaxerror timeout
224syn keyword postscrConstant contained typecheck undefined undefinedfilename undefinedresource
225syn keyword postscrConstant contained undefinedresult unmatchedmark unregistered VMerror
226
227if exists("postscr_fonts")
228" Font names
229 syn keyword postscrConstant contained Symbol Times-Roman Times-Italic Times-Bold Times-BoldItalic
230 syn keyword postscrConstant contained Helvetica Helvetica-Oblique Helvetica-Bold Helvetica-BoldOblique
231 syn keyword postscrConstant contained Courier Courier-Oblique Courier-Bold Courier-BoldOblique
232endif
233
234
235if exists("postscr_display")
236" Display PS only operators
237 syn keyword postscrOperator currentcontext fork join detach lock monitor condition wait notify yield
238 syn keyword postscrOperator viewclip eoviewclip rectviewclip initviewclip viewclippath deviceinfo
239 syn keyword postscrOperator sethalftonephase currenthalftonephase wtranslation defineusername
240endif
241
242" PS Character encoding names
243if exists("postscr_encodings")
244" Common encoding names
245 syn keyword postscrConstant contained .notdef
246
247" Standard and ISO encoding names
248 syn keyword postscrConstant contained space exclam quotedbl numbersign dollar percent ampersand quoteright
249 syn keyword postscrConstant contained parenleft parenright asterisk plus comma hyphen period slash zero
250 syn keyword postscrConstant contained one two three four five six seven eight nine colon semicolon less
251 syn keyword postscrConstant contained equal greater question at
252 syn keyword postscrConstant contained bracketleft backslash bracketright asciicircum underscore quoteleft
253 syn keyword postscrConstant contained braceleft bar braceright asciitilde
254 syn keyword postscrConstant contained exclamdown cent sterling fraction yen florin section currency
255 syn keyword postscrConstant contained quotesingle quotedblleft guillemotleft guilsinglleft guilsinglright
256 syn keyword postscrConstant contained fi fl endash dagger daggerdbl periodcentered paragraph bullet
257 syn keyword postscrConstant contained quotesinglbase quotedblbase quotedblright guillemotright ellipsis
258 syn keyword postscrConstant contained perthousand questiondown grave acute circumflex tilde macron breve
259 syn keyword postscrConstant contained dotaccent dieresis ring cedilla hungarumlaut ogonek caron emdash
260 syn keyword postscrConstant contained AE ordfeminine Lslash Oslash OE ordmasculine ae dotlessi lslash
261 syn keyword postscrConstant contained oslash oe germandbls
262" The following are valid names, but are used as short procedure names in generated PS!
263" a b c d e f g h i j k l m n o p q r s t u v w x y z
264" A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
265
266" Symbol encoding names
267 syn keyword postscrConstant contained universal existential suchthat asteriskmath minus
268 syn keyword postscrConstant contained congruent Alpha Beta Chi Delta Epsilon Phi Gamma Eta Iota theta1
269 syn keyword postscrConstant contained Kappa Lambda Mu Nu Omicron Pi Theta Rho Sigma Tau Upsilon sigma1
270 syn keyword postscrConstant contained Omega Xi Psi Zeta therefore perpendicular
271 syn keyword postscrConstant contained radicalex alpha beta chi delta epsilon phi gamma eta iota phi1
272 syn keyword postscrConstant contained kappa lambda mu nu omicron pi theta rho sigma tau upsilon omega1
273 syn keyword postscrConstant contained Upsilon1 minute lessequal infinity club diamond heart spade
274 syn keyword postscrConstant contained arrowboth arrowleft arrowup arrowright arrowdown degree plusminus
275 syn keyword postscrConstant contained second greaterequal multiply proportional partialdiff divide
276 syn keyword postscrConstant contained notequal equivalence approxequal arrowvertex arrowhorizex
277 syn keyword postscrConstant contained aleph Ifraktur Rfraktur weierstrass circlemultiply circleplus
278 syn keyword postscrConstant contained emptyset intersection union propersuperset reflexsuperset notsubset
279 syn keyword postscrConstant contained propersubset reflexsubset element notelement angle gradient
280 syn keyword postscrConstant contained registerserif copyrightserif trademarkserif radical dotmath
281 syn keyword postscrConstant contained logicalnot logicaland logicalor arrowdblboth arrowdblleft arrowdblup
282 syn keyword postscrConstant contained arrowdblright arrowdbldown omega xi psi zeta similar carriagereturn
283 syn keyword postscrConstant contained lozenge angleleft registersans copyrightsans trademarksans summation
284 syn keyword postscrConstant contained parenlefttp parenleftex parenleftbt bracketlefttp bracketleftex
285 syn keyword postscrConstant contained bracketleftbt bracelefttp braceleftmid braceleftbt braceex euro
286 syn keyword postscrConstant contained angleright integral integraltp integralex integralbt parenrighttp
287 syn keyword postscrConstant contained parenrightex parenrightbt bracketrighttp bracketrightex
288 syn keyword postscrConstant contained bracketrightbt bracerighttp bracerightmid bracerightbt
289
290" ISO Latin1 encoding names
291 syn keyword postscrConstant contained brokenbar copyright registered twosuperior threesuperior
292 syn keyword postscrConstant contained onesuperior onequarter onehalf threequarters
293 syn keyword postscrConstant contained Agrave Aacute Acircumflex Atilde Adieresis Aring Ccedilla Egrave
294 syn keyword postscrConstant contained Eacute Ecircumflex Edieresis Igrave Iacute Icircumflex Idieresis
295 syn keyword postscrConstant contained Eth Ntilde Ograve Oacute Ocircumflex Otilde Odieresis Ugrave Uacute
296 syn keyword postscrConstant contained Ucircumflex Udieresis Yacute Thorn
297 syn keyword postscrConstant contained agrave aacute acircumflex atilde adieresis aring ccedilla egrave
298 syn keyword postscrConstant contained eacute ecircumflex edieresis igrave iacute icircumflex idieresis
299 syn keyword postscrConstant contained eth ntilde ograve oacute ocircumflex otilde odieresis ugrave uacute
300 syn keyword postscrConstant contained ucircumflex udieresis yacute thorn ydieresis
301 syn keyword postscrConstant contained zcaron exclamsmall Hungarumlautsmall dollaroldstyle dollarsuperior
302 syn keyword postscrConstant contained ampersandsmall Acutesmall parenleftsuperior parenrightsuperior
303 syn keyword postscrConstant contained twodotenleader onedotenleader zerooldstyle oneoldstyle twooldstyle
304 syn keyword postscrConstant contained threeoldstyle fouroldstyle fiveoldstyle sixoldstyle sevenoldstyle
305 syn keyword postscrConstant contained eightoldstyle nineoldstyle commasuperior
306 syn keyword postscrConstant contained threequartersemdash periodsuperior questionsmall asuperior bsuperior
307 syn keyword postscrConstant contained centsuperior dsuperior esuperior isuperior lsuperior msuperior
308 syn keyword postscrConstant contained nsuperior osuperior rsuperior ssuperior tsuperior ff ffi ffl
309 syn keyword postscrConstant contained parenleftinferior parenrightinferior Circumflexsmall hyphensuperior
310 syn keyword postscrConstant contained Gravesmall Asmall Bsmall Csmall Dsmall Esmall Fsmall Gsmall Hsmall
311 syn keyword postscrConstant contained Ismall Jsmall Ksmall Lsmall Msmall Nsmall Osmall Psmall Qsmall
312 syn keyword postscrConstant contained Rsmall Ssmall Tsmall Usmall Vsmall Wsmall Xsmall Ysmall Zsmall
313 syn keyword postscrConstant contained colonmonetary onefitted rupiah Tildesmall exclamdownsmall
314 syn keyword postscrConstant contained centoldstyle Lslashsmall Scaronsmall Zcaronsmall Dieresissmall
315 syn keyword postscrConstant contained Brevesmall Caronsmall Dotaccentsmall Macronsmall figuredash
316 syn keyword postscrConstant contained hypheninferior Ogoneksmall Ringsmall Cedillasmall questiondownsmall
317 syn keyword postscrConstant contained oneeighth threeeighths fiveeighths seveneighths onethird twothirds
318 syn keyword postscrConstant contained zerosuperior foursuperior fivesuperior sixsuperior sevensuperior
319 syn keyword postscrConstant contained eightsuperior ninesuperior zeroinferior oneinferior twoinferior
320 syn keyword postscrConstant contained threeinferior fourinferior fiveinferior sixinferior seveninferior
321 syn keyword postscrConstant contained eightinferior nineinferior centinferior dollarinferior periodinferior
322 syn keyword postscrConstant contained commainferior Agravesmall Aacutesmall Acircumflexsmall
323 syn keyword postscrConstant contained Atildesmall Adieresissmall Aringsmall AEsmall Ccedillasmall
324 syn keyword postscrConstant contained Egravesmall Eacutesmall Ecircumflexsmall Edieresissmall Igravesmall
325 syn keyword postscrConstant contained Iacutesmall Icircumflexsmall Idieresissmall Ethsmall Ntildesmall
326 syn keyword postscrConstant contained Ogravesmall Oacutesmall Ocircumflexsmall Otildesmall Odieresissmall
327 syn keyword postscrConstant contained OEsmall Oslashsmall Ugravesmall Uacutesmall Ucircumflexsmall
328 syn keyword postscrConstant contained Udieresissmall Yacutesmall Thornsmall Ydieresissmall Black Bold Book
329 syn keyword postscrConstant contained Light Medium Regular Roman Semibold
330
331" Sundry standard and expert encoding names
332 syn keyword postscrConstant contained trademark Scaron Ydieresis Zcaron scaron softhyphen overscore
333 syn keyword postscrConstant contained graybox Sacute Tcaron Zacute sacute tcaron zacute Aogonek Scedilla
334 syn keyword postscrConstant contained Zdotaccent aogonek scedilla Lcaron lcaron zdotaccent Racute Abreve
335 syn keyword postscrConstant contained Lacute Cacute Ccaron Eogonek Ecaron Dcaron Dcroat Nacute Ncaron
336 syn keyword postscrConstant contained Ohungarumlaut Rcaron Uring Uhungarumlaut Tcommaaccent racute abreve
337 syn keyword postscrConstant contained lacute cacute ccaron eogonek ecaron dcaron dcroat nacute ncaron
338 syn keyword postscrConstant contained ohungarumlaut rcaron uring uhungarumlaut tcommaaccent Gbreve
339 syn keyword postscrConstant contained Idotaccent gbreve blank apple
340endif
341
342
343" By default level 3 includes all level 2 operators
344if postscr_level == 2 || postscr_level == 3
345" Dictionary operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000346 syn match postscrL2Operator "\(<<\|>>\)"
347 syn keyword postscrL2Operator undef
Bram Moolenaar071d4272004-06-13 20:20:40 +0000348 syn keyword postscrConstant globaldict shareddict
349
350" Device operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000351 syn keyword postscrL2Operator setpagedevice currentpagedevice
Bram Moolenaar071d4272004-06-13 20:20:40 +0000352
353" Path operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000354 syn keyword postscrL2Operator rectclip setbbox uappend ucache upath ustrokepath arct
Bram Moolenaar071d4272004-06-13 20:20:40 +0000355
356" Painting operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000357 syn keyword postscrL2Operator rectfill rectstroke ufill ueofill ustroke
Bram Moolenaar071d4272004-06-13 20:20:40 +0000358
359" Array operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000360 syn keyword postscrL2Operator currentpacking setpacking packedarray
Bram Moolenaar071d4272004-06-13 20:20:40 +0000361
362" Misc operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000363 syn keyword postscrL2Operator languagelevel
Bram Moolenaar071d4272004-06-13 20:20:40 +0000364
365" Insideness operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000366 syn keyword postscrL2Operator infill ineofill instroke inufill inueofill inustroke
Bram Moolenaar071d4272004-06-13 20:20:40 +0000367
368" GState operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000369 syn keyword postscrL2Operator gstate setgstate currentgstate setcolor
370 syn keyword postscrL2Operator setcolorspace currentcolorspace setstrokeadjust currentstrokeadjust
371 syn keyword postscrL2Operator currentcolor
Bram Moolenaar071d4272004-06-13 20:20:40 +0000372
373" Device gstate operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000374 syn keyword postscrL2Operator sethalftone currenthalftone setoverprint currentoverprint
375 syn keyword postscrL2Operator setcolorrendering currentcolorrendering
Bram Moolenaar071d4272004-06-13 20:20:40 +0000376
377" Character operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000378 syn keyword postscrL2Constant GlobalFontDirectory SharedFontDirectory
379 syn keyword postscrL2Operator glyphshow selectfont
380 syn keyword postscrL2Operator addglyph undefinefont xshow xyshow yshow
Bram Moolenaar071d4272004-06-13 20:20:40 +0000381
382" Pattern operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000383 syn keyword postscrL2Operator makepattern setpattern execform
Bram Moolenaar071d4272004-06-13 20:20:40 +0000384
385" Resource operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000386 syn keyword postscrL2Operator defineresource undefineresource findresource resourcestatus
387 syn keyword postscrL2Repeat resourceforall
Bram Moolenaar071d4272004-06-13 20:20:40 +0000388
389" File operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000390 syn keyword postscrL2Operator filter printobject writeobject setobjectformat currentobjectformat
Bram Moolenaar071d4272004-06-13 20:20:40 +0000391
392" VM operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000393 syn keyword postscrL2Operator currentshared setshared defineuserobject execuserobject undefineuserobject
394 syn keyword postscrL2Operator gcheck scheck startjob currentglobal setglobal
Bram Moolenaar071d4272004-06-13 20:20:40 +0000395 syn keyword postscrConstant UserObjects
396
397" Interpreter operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000398 syn keyword postscrL2Operator setucacheparams setvmthreshold ucachestatus setsystemparams
399 syn keyword postscrL2Operator setuserparams currentuserparams setcacheparams currentcacheparams
400 syn keyword postscrL2Operator currentdevparams setdevparams vmreclaim currentsystemparams
Bram Moolenaar071d4272004-06-13 20:20:40 +0000401
402" PS2 constants
403 syn keyword postscrConstant contained DeviceCMYK Pattern Indexed Separation Cyan Magenta Yellow Black
404 syn keyword postscrConstant contained CIEBasedA CIEBasedABC CIEBasedDEF CIEBasedDEFG
405
406" PS2 $error dictionary entries
407 syn keyword postscrConstant contained newerror errorname command errorinfo ostack estack dstack
408 syn keyword postscrConstant contained recordstacks binary
409
410" PS2 Category dictionary
411 syn keyword postscrConstant contained DefineResource UndefineResource FindResource ResourceStatus
412 syn keyword postscrConstant contained ResourceForAll Category InstanceType ResourceFileName
413
414" PS2 Category names
415 syn keyword postscrConstant contained Font Encoding Form Pattern ProcSet ColorSpace Halftone
416 syn keyword postscrConstant contained ColorRendering Filter ColorSpaceFamily Emulator IODevice
417 syn keyword postscrConstant contained ColorRenderingType FMapType FontType FormType HalftoneType
418 syn keyword postscrConstant contained ImageType PatternType Category Generic
419
420" PS2 pagedevice dictionary entries
421 syn keyword postscrConstant contained PageSize MediaColor MediaWeight MediaType InputAttributes ManualFeed
422 syn keyword postscrConstant contained OutputType OutputAttributes NumCopies Collate Duplex Tumble
423 syn keyword postscrConstant contained Separations HWResolution Margins NegativePrint MirrorPrint
424 syn keyword postscrConstant contained CutMedia AdvanceMedia AdvanceDistance ImagingBBox
425 syn keyword postscrConstant contained Policies Install BeginPage EndPage PolicyNotFound PolicyReport
426 syn keyword postscrConstant contained ManualSize OutputFaceUp Jog
427 syn keyword postscrConstant contained Bind BindDetails Booklet BookletDetails CollateDetails
428 syn keyword postscrConstant contained DeviceRenderingInfo ExitJamRecovery Fold FoldDetails Laminate
429 syn keyword postscrConstant contained ManualFeedTimeout Orientation OutputPage
430 syn keyword postscrConstant contained PostRenderingEnhance PostRenderingEnhanceDetails
431 syn keyword postscrConstant contained PreRenderingEnhance PreRenderingEnhanceDetails
432 syn keyword postscrConstant contained Signature SlipSheet Staple StapleDetails Trim
433 syn keyword postscrConstant contained ProofSet REValue PrintQuality ValuesPerColorComponent AntiAlias
434
435" PS2 PDL resource entries
436 syn keyword postscrConstant contained Selector LanguageFamily LanguageVersion
437
438" PS2 halftone dictionary entries
439 syn keyword postscrConstant contained HalftoneType HalftoneName
440 syn keyword postscrConstant contained AccurateScreens ActualAngle Xsquare Ysquare AccurateFrequency
441 syn keyword postscrConstant contained Frequency SpotFunction Angle Width Height Thresholds
442 syn keyword postscrConstant contained RedFrequency RedSpotFunction RedAngle RedWidth RedHeight
443 syn keyword postscrConstant contained GreenFrequency GreenSpotFunction GreenAngle GreenWidth GreenHeight
444 syn keyword postscrConstant contained BlueFrequency BlueSpotFunction BlueAngle BlueWidth BlueHeight
445 syn keyword postscrConstant contained GrayFrequency GrayAngle GraySpotFunction GrayWidth GrayHeight
446 syn keyword postscrConstant contained GrayThresholds BlueThresholds GreenThresholds RedThresholds
447 syn keyword postscrConstant contained TransferFunction
448
449" PS2 CSR dictionaries
450 syn keyword postscrConstant contained RangeA DecodeA MatrixA RangeABC DecodeABC MatrixABC BlackPoint
451 syn keyword postscrConstant contained RangeLMN DecodeLMN MatrixLMN WhitePoint RangeDEF DecodeDEF RangeHIJ
452 syn keyword postscrConstant contained RangeDEFG DecodeDEFG RangeHIJK Table
453
454" PS2 CRD dictionaries
455 syn keyword postscrConstant contained ColorRenderingType EncodeLMB EncodeABC RangePQR MatrixPQR
456 syn keyword postscrConstant contained AbsoluteColorimetric RelativeColorimetric Saturation Perceptual
457 syn keyword postscrConstant contained TransformPQR RenderTable
458
459" PS2 Pattern dictionary
460 syn keyword postscrConstant contained PatternType PaintType TilingType XStep YStep
461
462" PS2 Image dictionary
463 syn keyword postscrConstant contained ImageType ImageMatrix MultipleDataSources DataSource
464 syn keyword postscrConstant contained BitsPerComponent Decode Interpolate
465
466" PS2 Font dictionaries
467 syn keyword postscrConstant contained FontType FontMatrix FontName FontInfo LanguageLevel WMode Encoding
468 syn keyword postscrConstant contained UniqueID StrokeWidth Metrics Metrics2 CDevProc CharStrings Private
469 syn keyword postscrConstant contained FullName Notice version ItalicAngle isFixedPitch UnderlinePosition
470 syn keyword postscrConstant contained FMapType Encoding FDepVector PrefEnc EscChar ShiftOut ShiftIn
471 syn keyword postscrConstant contained WeightVector Blend $Blend CIDFontType sfnts CIDSystemInfo CodeMap
472 syn keyword postscrConstant contained CMap CIDFontName CIDSystemInfo UIDBase CIDDevProc CIDCount
473 syn keyword postscrConstant contained CIDMapOffset FDArray FDBytes GDBytes GlyphData GlyphDictionary
474 syn keyword postscrConstant contained SDBytes SubrMapOffset SubrCount BuildGlyph CIDMap FID MIDVector
475 syn keyword postscrConstant contained Ordering Registry Supplement CMapName CMapVersion UIDOffset
476 syn keyword postscrConstant contained SubsVector UnderlineThickness FamilyName FontBBox CurMID
477 syn keyword postscrConstant contained Weight
478
479" PS2 User paramters
480 syn keyword postscrConstant contained MaxFontItem MinFontCompress MaxUPathItem MaxFormItem MaxPatternItem
481 syn keyword postscrConstant contained MaxScreenItem MaxOpStack MaxDictStack MaxExecStack MaxLocalVM
482 syn keyword postscrConstant contained VMReclaim VMThreshold
483
484" PS2 System paramters
485 syn keyword postscrConstant contained SystemParamsPassword StartJobPassword BuildTime ByteOrder RealFormat
486 syn keyword postscrConstant contained MaxFontCache CurFontCache MaxOutlineCache CurOutlineCache
487 syn keyword postscrConstant contained MaxUPathCache CurUPathCache MaxFormCache CurFormCache
488 syn keyword postscrConstant contained MaxPatternCache CurPatternCache MaxScreenStorage CurScreenStorage
489 syn keyword postscrConstant contained MaxDisplayList CurDisplayList
490
491" PS2 LZW Filters
492 syn keyword postscrConstant contained Predictor
493
494" Paper Size operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000495 syn keyword postscrL2Operator letter lettersmall legal ledger 11x17 a4 a3 a4small b5 note
Bram Moolenaar071d4272004-06-13 20:20:40 +0000496
497" Paper Tray operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000498 syn keyword postscrL2Operator lettertray legaltray ledgertray a3tray a4tray b5tray 11x17tray
Bram Moolenaar071d4272004-06-13 20:20:40 +0000499
500" SCC compatibility operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000501 syn keyword postscrL2Operator sccbatch sccinteractive setsccbatch setsccinteractive
Bram Moolenaar071d4272004-06-13 20:20:40 +0000502
503" Page duplexing operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000504 syn keyword postscrL2Operator duplexmode firstside newsheet setduplexmode settumble tumble
Bram Moolenaar071d4272004-06-13 20:20:40 +0000505
506" Device compatability operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000507 syn keyword postscrL2Operator devdismount devformat devmount devstatus
508 syn keyword postscrL2Repeat devforall
Bram Moolenaar071d4272004-06-13 20:20:40 +0000509
510" Imagesetter compatability operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000511 syn keyword postscrL2Operator accuratescreens checkscreen pagemargin pageparams setaccuratescreens setpage
512 syn keyword postscrL2Operator setpagemargin setpageparams
Bram Moolenaar071d4272004-06-13 20:20:40 +0000513
514" Misc compatability operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000515 syn keyword postscrL2Operator appletalktype buildtime byteorder checkpassword defaulttimeouts diskonline
516 syn keyword postscrL2Operator diskstatus manualfeed manualfeedtimeout margins mirrorprint pagecount
517 syn keyword postscrL2Operator pagestackorder printername processcolors sethardwareiomode setjobtimeout
518 syn keyword postscrL2Operator setpagestockorder setprintername setresolution doprinterrors dostartpage
519 syn keyword postscrL2Operator hardwareiomode initializedisk jobname jobtimeout ramsize realformat resolution
520 syn keyword postscrL2Operator setdefaulttimeouts setdoprinterrors setdostartpage setdosysstart
521 syn keyword postscrL2Operator setuserdiskpercent softwareiomode userdiskpercent waittimeout
522 syn keyword postscrL2Operator setsoftwareiomode dosysstart emulate setmargins setmirrorprint
Bram Moolenaar071d4272004-06-13 20:20:40 +0000523
524endif " PS2 highlighting
525
526if postscr_level == 3
527" Shading operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000528 syn keyword postscrL3Operator setsmoothness currentsmoothness shfill
Bram Moolenaar071d4272004-06-13 20:20:40 +0000529
530" Clip operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000531 syn keyword postscrL3Operator clipsave cliprestore
Bram Moolenaar071d4272004-06-13 20:20:40 +0000532
533" Pagedevive operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000534 syn keyword postscrL3Operator setpage setpageparams
Bram Moolenaar071d4272004-06-13 20:20:40 +0000535
536" Device gstate operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000537 syn keyword postscrL3Operator findcolorrendering
Bram Moolenaar071d4272004-06-13 20:20:40 +0000538
539" Font operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000540 syn keyword postscrL3Operator composefont
Bram Moolenaar071d4272004-06-13 20:20:40 +0000541
542" PS LL3 Output device resource entries
543 syn keyword postscrConstant contained DeviceN TrappingDetailsType
544
545" PS LL3 pagdevice dictionary entries
546 syn keyword postscrConstant contained DeferredMediaSelection ImageShift InsertSheet LeadingEdge MaxSeparations
547 syn keyword postscrConstant contained MediaClass MediaPosition OutputDevice PageDeviceName PageOffset ProcessColorModel
548 syn keyword postscrConstant contained RollFedMedia SeparationColorNames SeparationOrder Trapping TrappingDetails
549 syn keyword postscrConstant contained TraySwitch UseCIEColor
550 syn keyword postscrConstant contained ColorantDetails ColorantName ColorantType NeutralDensity TrappingOrder
551 syn keyword postscrConstant contained ColorantSetName
552
553" PS LL3 trapping dictionary entries
554 syn keyword postscrConstant contained BlackColorLimit BlackDensityLimit BlackWidth ColorantZoneDetails
555 syn keyword postscrConstant contained SlidingTrapLimit StepLimit TrapColorScaling TrapSetName TrapWidth
556 syn keyword postscrConstant contained ImageResolution ImageToObjectTrapping ImageTrapPlacement
557 syn keyword postscrConstant contained StepLimit TrapColorScaling Enabled ImageInternalTrapping
558
559" PS LL3 filters and entries
560 syn keyword postscrConstant contained ReusableStreamDecode CloseSource CloseTarget UnitSize LowBitFirst
561 syn keyword postscrConstant contained FlateEncode FlateDecode DecodeParams Intent AsyncRead
562
563" PS LL3 halftone dictionary entries
564 syn keyword postscrConstant contained Height2 Width2
565
566" PS LL3 function dictionary entries
567 syn keyword postscrConstant contained FunctionType Domain Range Order BitsPerSample Encode Size C0 C1 N
568 syn keyword postscrConstant contained Functions Bounds
569
570" PS LL3 image dictionary entries
571 syn keyword postscrConstant contained InterleaveType MaskDict DataDict MaskColor
572
573" PS LL3 Pattern and shading dictionary entries
574 syn keyword postscrConstant contained Shading ShadingType Background ColorSpace Coords Extend Function
575 syn keyword postscrConstant contained VerticesPerRow BitsPerCoordinate BitsPerFlag
576
577" PS LL3 image dictionary entries
578 syn keyword postscrConstant contained XOrigin YOrigin UnpaintedPath PixelCopy
579
580" PS LL3 colorrendering procedures
581 syn keyword postscrProcedure GetHalftoneName GetPageDeviceName GetSubstituteCRD
582
583" PS LL3 CIDInit procedures
584 syn keyword postscrProcedure beginbfchar beginbfrange begincidchar begincidrange begincmap begincodespacerange
585 syn keyword postscrProcedure beginnotdefchar beginnotdefrange beginrearrangedfont beginusematrix
586 syn keyword postscrProcedure endbfchar endbfrange endcidchar endcidrange endcmap endcodespacerange
587 syn keyword postscrProcedure endnotdefchar endnotdefrange endrearrangedfont endusematrix
588 syn keyword postscrProcedure StartData usefont usecmp
589
590" PS LL3 Trapping procedures
591 syn keyword postscrProcedure settrapparams currenttrapparams settrapzone
592
593" PS LL3 BitmapFontInit procedures
594 syn keyword postscrProcedure removeall removeglyphs
595
596" PS LL3 Font names
597 if exists("postscr_fonts")
598 syn keyword postscrConstant contained AlbertusMT AlbertusMT-Italic AlbertusMT-Light Apple-Chancery Apple-ChanceryCE
599 syn keyword postscrConstant contained AntiqueOlive-Roman AntiqueOlive-Italic AntiqueOlive-Bold AntiqueOlive-Compact
600 syn keyword postscrConstant contained AntiqueOliveCE-Roman AntiqueOliveCE-Italic AntiqueOliveCE-Bold AntiqueOliveCE-Compact
601 syn keyword postscrConstant contained ArialMT Arial-ItalicMT Arial-LightMT Arial-BoldMT Arial-BoldItalicMT
602 syn keyword postscrConstant contained ArialCE ArialCE-Italic ArialCE-Light ArialCE-Bold ArialCE-BoldItalic
603 syn keyword postscrConstant contained AvantGarde-Book AvantGarde-BookOblique AvantGarde-Demi AvantGarde-DemiOblique
604 syn keyword postscrConstant contained AvantGardeCE-Book AvantGardeCE-BookOblique AvantGardeCE-Demi AvantGardeCE-DemiOblique
605 syn keyword postscrConstant contained Bodoni Bodoni-Italic Bodoni-Bold Bodoni-BoldItalic Bodoni-Poster Bodoni-PosterCompressed
606 syn keyword postscrConstant contained BodoniCE BodoniCE-Italic BodoniCE-Bold BodoniCE-BoldItalic BodoniCE-Poster BodoniCE-PosterCompressed
607 syn keyword postscrConstant contained Bookman-Light Bookman-LightItalic Bookman-Demi Bookman-DemiItalic
608 syn keyword postscrConstant contained BookmanCE-Light BookmanCE-LightItalic BookmanCE-Demi BookmanCE-DemiItalic
609 syn keyword postscrConstant contained Carta Chicago ChicagoCE Clarendon Clarendon-Light Clarendon-Bold
610 syn keyword postscrConstant contained ClarendonCE ClarendonCE-Light ClarendonCE-Bold CooperBlack CooperBlack-Italic
611 syn keyword postscrConstant contained Copperplate-ThirtyTwoBC CopperPlate-ThirtyThreeBC Coronet-Regular CoronetCE-Regular
612 syn keyword postscrConstant contained CourierCE CourierCE-Oblique CourierCE-Bold CourierCE-BoldOblique
613 syn keyword postscrConstant contained Eurostile Eurostile-Bold Eurostile-ExtendedTwo Eurostile-BoldExtendedTwo
614 syn keyword postscrConstant contained Eurostile EurostileCE-Bold EurostileCE-ExtendedTwo EurostileCE-BoldExtendedTwo
615 syn keyword postscrConstant contained Geneva GenevaCE GillSans GillSans-Italic GillSans-Bold GillSans-BoldItalic GillSans-BoldCondensed
616 syn keyword postscrConstant contained GillSans-Light GillSans-LightItalic GillSans-ExtraBold
617 syn keyword postscrConstant contained GillSansCE-Roman GillSansCE-Italic GillSansCE-Bold GillSansCE-BoldItalic GillSansCE-BoldCondensed
618 syn keyword postscrConstant contained GillSansCE-Light GillSansCE-LightItalic GillSansCE-ExtraBold
619 syn keyword postscrConstant contained Goudy Goudy-Italic Goudy-Bold Goudy-BoldItalic Goudy-ExtraBould
620 syn keyword postscrConstant contained HelveticaCE HelveticaCE-Oblique HelveticaCE-Bold HelveticaCE-BoldOblique
621 syn keyword postscrConstant contained Helvetica-Condensed Helvetica-Condensed-Oblique Helvetica-Condensed-Bold Helvetica-Condensed-BoldObl
622 syn keyword postscrConstant contained HelveticaCE-Condensed HelveticaCE-Condensed-Oblique HelveticaCE-Condensed-Bold
623 syn keyword postscrConstant contained HelveticaCE-Condensed-BoldObl Helvetica-Narrow Helvetica-Narrow-Oblique Helvetica-Narrow-Bold
624 syn keyword postscrConstant contained Helvetica-Narrow-BoldOblique HelveticaCE-Narrow HelveticaCE-Narrow-Oblique HelveticaCE-Narrow-Bold
625 syn keyword postscrConstant contained HelveticaCE-Narrow-BoldOblique HoeflerText-Regular HoeflerText-Italic HoeflerText-Black
626 syn keyword postscrConstant contained HoeflerText-BlackItalic HoeflerText-Ornaments HoeflerTextCE-Regular HoeflerTextCE-Italic
627 syn keyword postscrConstant contained HoeflerTextCE-Black HoeflerTextCE-BlackItalic
628 syn keyword postscrConstant contained JoannaMT JoannaMT-Italic JoannaMT-Bold JoannaMT-BoldItalic
629 syn keyword postscrConstant contained JoannaMTCE JoannaMTCE-Italic JoannaMTCE-Bold JoannaMTCE-BoldItalic
630 syn keyword postscrConstant contained LetterGothic LetterGothic-Slanted LetterGothic-Bold LetterGothic-BoldSlanted
631 syn keyword postscrConstant contained LetterGothicCE LetterGothicCE-Slanted LetterGothicCE-Bold LetterGothicCE-BoldSlanted
632 syn keyword postscrConstant contained LubalinGraph-Book LubalinGraph-BookOblique LubalinGraph-Demi LubalinGraph-DemiOblique
633 syn keyword postscrConstant contained LubalinGraphCE-Book LubalinGraphCE-BookOblique LubalinGraphCE-Demi LubalinGraphCE-DemiOblique
634 syn keyword postscrConstant contained Marigold Monaco MonacoCE MonaLisa-Recut Oxford Symbol Tekton
635 syn keyword postscrConstant contained NewCennturySchlbk-Roman NewCenturySchlbk-Italic NewCenturySchlbk-Bold NewCenturySchlbk-BoldItalic
636 syn keyword postscrConstant contained NewCenturySchlbkCE-Roman NewCenturySchlbkCE-Italic NewCenturySchlbkCE-Bold
637 syn keyword postscrConstant contained NewCenturySchlbkCE-BoldItalic NewYork NewYorkCE
638 syn keyword postscrConstant contained Optima Optima-Italic Optima-Bold Optima-BoldItalic
639 syn keyword postscrConstant contained OptimaCE OptimaCE-Italic OptimaCE-Bold OptimaCE-BoldItalic
640 syn keyword postscrConstant contained Palatino-Roman Palatino-Italic Palatino-Bold Palatino-BoldItalic
641 syn keyword postscrConstant contained PalatinoCE-Roman PalatinoCE-Italic PalatinoCE-Bold PalatinoCE-BoldItalic
642 syn keyword postscrConstant contained StempelGaramond-Roman StempelGaramond-Italic StempelGaramond-Bold StempelGaramond-BoldItalic
643 syn keyword postscrConstant contained StempelGaramondCE-Roman StempelGaramondCE-Italic StempelGaramondCE-Bold StempelGaramondCE-BoldItalic
644 syn keyword postscrConstant contained TimesCE-Roman TimesCE-Italic TimesCE-Bold TimesCE-BoldItalic
645 syn keyword postscrConstant contained TimesNewRomanPSMT TimesNewRomanPS-ItalicMT TimesNewRomanPS-BoldMT TimesNewRomanPS-BoldItalicMT
646 syn keyword postscrConstant contained TimesNewRomanCE TimesNewRomanCE-Italic TimesNewRomanCE-Bold TimesNewRomanCE-BoldItalic
647 syn keyword postscrConstant contained Univers Univers-Oblique Univers-Bold Univers-BoldOblique
648 syn keyword postscrConstant contained UniversCE-Medium UniversCE-Oblique UniversCE-Bold UniversCE-BoldOblique
649 syn keyword postscrConstant contained Univers-Light Univers-LightOblique UniversCE-Light UniversCE-LightOblique
650 syn keyword postscrConstant contained Univers-Condensed Univers-CondensedOblique Univers-CondensedBold Univers-CondensedBoldOblique
651 syn keyword postscrConstant contained UniversCE-Condensed UniversCE-CondensedOblique UniversCE-CondensedBold UniversCE-CondensedBoldOblique
652 syn keyword postscrConstant contained Univers-Extended Univers-ExtendedObl Univers-BoldExt Univers-BoldExtObl
653 syn keyword postscrConstant contained UniversCE-Extended UniversCE-ExtendedObl UniversCE-BoldExt UniversCE-BoldExtObl
654 syn keyword postscrConstant contained Wingdings-Regular ZapfChancery-MediumItalic ZapfChanceryCE-MediumItalic ZapfDingBats
655 endif " Font names
656
657endif " PS LL3 highlighting
658
659
660if exists("postscr_ghostscript")
661 " GS gstate operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000662 syn keyword postscrGSOperator .setaccuratecurves .currentaccuratecurves .setclipoutside
663 syn keyword postscrGSOperator .setdashadapt .currentdashadapt .setdefaultmatrix .setdotlength
664 syn keyword postscrGSOperator .currentdotlength .setfilladjust2 .currentfilladjust2
665 syn keyword postscrGSOperator .currentclipoutside .setcurvejoin .currentcurvejoin
666 syn keyword postscrGSOperator .setblendmode .currentblendmode .setopacityalpha .currentopacityalpha .setshapealpha .currentshapealpha
667 syn keyword postscrGSOperator .setlimitclamp .currentlimitclamp .setoverprintmode .currentoverprintmode
Bram Moolenaar071d4272004-06-13 20:20:40 +0000668
669 " GS path operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000670 syn keyword postscrGSOperator .dashpath .rectappend
Bram Moolenaar071d4272004-06-13 20:20:40 +0000671
672 " GS painting operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000673 syn keyword postscrGSOperator .setrasterop .currentrasterop .setsourcetransparent
674 syn keyword postscrGSOperator .settexturetransparent .currenttexturetransparent
675 syn keyword postscrGSOperator .currentsourcetransparent
Bram Moolenaar071d4272004-06-13 20:20:40 +0000676
677 " GS character operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000678 syn keyword postscrGSOperator .charboxpath .type1execchar %Type1BuildChar %Type1BuildGlyph
Bram Moolenaar071d4272004-06-13 20:20:40 +0000679
680 " GS mathematical operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000681 syn keyword postscrGSMathOperator arccos arcsin
Bram Moolenaar071d4272004-06-13 20:20:40 +0000682
683 " GS dictionary operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000684 syn keyword postscrGSOperator .dicttomark .forceput .forceundef .knownget .setmaxlength
Bram Moolenaar071d4272004-06-13 20:20:40 +0000685
686 " GS byte and string operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000687 syn keyword postscrGSOperator .type1encrypt .type1decrypt
688 syn keyword postscrGSOperator .bytestring .namestring .stringmatch
Bram Moolenaar071d4272004-06-13 20:20:40 +0000689
690 " GS relational operators (seem like math ones to me!)
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000691 syn keyword postscrGSMathOperator max min
Bram Moolenaar071d4272004-06-13 20:20:40 +0000692
693 " GS file operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000694 syn keyword postscrGSOperator findlibfile unread writeppmfile
695 syn keyword postscrGSOperator .filename .fileposition .peekstring .unread
Bram Moolenaar071d4272004-06-13 20:20:40 +0000696
697 " GS vm operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000698 syn keyword postscrGSOperator .forgetsave
Bram Moolenaar071d4272004-06-13 20:20:40 +0000699
700 " GS device operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000701 syn keyword postscrGSOperator copydevice .getdevice makeimagedevice makewordimagedevice copyscanlines
702 syn keyword postscrGSOperator setdevice currentdevice getdeviceprops putdeviceprops flushpage
703 syn keyword postscrGSOperator finddevice findprotodevice .getbitsrect
Bram Moolenaar071d4272004-06-13 20:20:40 +0000704
705 " GS misc operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000706 syn keyword postscrGSOperator getenv .makeoperator .setdebug .oserrno .oserror .execn
Bram Moolenaar071d4272004-06-13 20:20:40 +0000707
708 " GS rendering stack operators
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000709 syn keyword postscrGSOperator .begintransparencygroup .discardtransparencygroup .endtransparencygroup
710 syn keyword postscrGSOperator .begintransparencymask .discardtransparencymask .endtransparencymask .inittransparencymask
711 syn keyword postscrGSOperator .settextknockout .currenttextknockout
Bram Moolenaar071d4272004-06-13 20:20:40 +0000712
713 " GS filters
714 syn keyword postscrConstant contained BCPEncode BCPDecode eexecEncode eexecDecode PCXDecode
715 syn keyword postscrConstant contained PixelDifferenceEncode PixelDifferenceDecode
716 syn keyword postscrConstant contained PNGPredictorDecode TBCPEncode TBCPDecode zlibEncode
717 syn keyword postscrConstant contained zlibDecode PNGPredictorEncode PFBDecode
718 syn keyword postscrConstant contained MD5Encode
719
720 " GS filter keys
721 syn keyword postscrConstant contained InitialCodeLength FirstBitLowOrder BlockData DecodedByteAlign
722
723 " GS device parameters
724 syn keyword postscrConstant contained BitsPerPixel .HWMargins HWSize Name GrayValues
725 syn keyword postscrConstant contained ColorValues TextAlphaBits GraphicsAlphaBits BufferSpace
726 syn keyword postscrConstant contained OpenOutputFile PageCount BandHeight BandWidth BandBufferSpace
727 syn keyword postscrConstant contained ViewerPreProcess GreenValues BlueValues OutputFile
728 syn keyword postscrConstant contained MaxBitmap RedValues
729
730endif " GhostScript highlighting
731
732" Define the default highlighting.
733" For version 5.7 and earlier: only when not done already
734" For version 5.8 and later: only when an item doesn't have highlighting yet
735if version >= 508 || !exists("did_postscr_syntax_inits")
736 if version < 508
737 let did_postscr_syntax_inits = 1
738 command -nargs=+ HiLink hi link <args>
739 else
740 command -nargs=+ HiLink hi def link <args>
741 endif
742
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000743 HiLink postscrComment Comment
Bram Moolenaar071d4272004-06-13 20:20:40 +0000744
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000745 HiLink postscrConstant Constant
746 HiLink postscrString String
747 HiLink postscrASCIIString postscrString
748 HiLink postscrHexString postscrString
749 HiLink postscrASCII85String postscrString
750 HiLink postscrNumber Number
751 HiLink postscrInteger postscrNumber
752 HiLink postscrHex postscrNumber
753 HiLink postscrRadix postscrNumber
754 HiLink postscrFloat Float
755 HiLink postscrBoolean Boolean
Bram Moolenaar071d4272004-06-13 20:20:40 +0000756
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000757 HiLink postscrIdentifier Identifier
758 HiLink postscrProcedure Function
Bram Moolenaar071d4272004-06-13 20:20:40 +0000759
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000760 HiLink postscrName Statement
761 HiLink postscrConditional Conditional
762 HiLink postscrRepeat Repeat
763 HiLink postscrL2Repeat postscrRepeat
764 HiLink postscrOperator Operator
765 HiLink postscrL1Operator postscrOperator
766 HiLink postscrL2Operator postscrOperator
767 HiLink postscrL3Operator postscrOperator
768 HiLink postscrMathOperator postscrOperator
Bram Moolenaar071d4272004-06-13 20:20:40 +0000769 HiLink postscrLogicalOperator postscrOperator
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000770 HiLink postscrBinaryOperator postscrOperator
Bram Moolenaar071d4272004-06-13 20:20:40 +0000771
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000772 HiLink postscrDSCComment SpecialComment
773 HiLink postscrSpecialChar SpecialChar
Bram Moolenaar071d4272004-06-13 20:20:40 +0000774
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000775 HiLink postscrTodo Todo
Bram Moolenaar071d4272004-06-13 20:20:40 +0000776
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000777 HiLink postscrError Error
Bram Moolenaar071d4272004-06-13 20:20:40 +0000778 HiLink postscrSpecialCharError postscrError
779 HiLink postscrASCII85CharError postscrError
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000780 HiLink postscrHexCharError postscrError
781 HiLink postscrASCIIStringError postscrError
Bram Moolenaar071d4272004-06-13 20:20:40 +0000782 HiLink postscrIdentifierError postscrError
783
Bram Moolenaarc1a11ed2008-06-24 22:09:24 +0000784 if exists("postscr_ghostscript")
785 HiLink postscrGSOperator postscrOperator
786 HiLink postscrGSMathOperator postscrMathOperator
787 else
788 HiLink postscrGSOperator postscrError
789 HiLink postscrGSMathOperator postscrError
790 endif
791
Bram Moolenaar071d4272004-06-13 20:20:40 +0000792 delcommand HiLink
793endif
794
795let b:current_syntax = "postscr"
796
797" vim: ts=8