! PostScript Level 3 Syntax Highlighting Patterns ! ! Dec 10, 1999 version 0.30 Chris Ross ! Major overhaul: removed non-operators from operator pattern. Split ! operators into Levels 1, 2, and 3; preserved most old operators in a ! separate pattern. Made a separate pattern for dictionary operators << ! >>. Nest strings to three levels. Literals are also delimited by / %. ! Set default word delimiters. Restructured for efficiency. ! Dec 9, 1998 version 0.22, tweaks to Number (radix pattern), added string ! escape characters; added = and == to Operator list. ! Dec 8, 1998 version 0.21, fixes for Literal, Number, Procedure and ! Array patterns; bugs found by Chris Ross ! Dec 3, 1998 version 0.2, incorporated patterns by Steven C. Kapp ! , Questra Corp, which were posted on the NEdit Users ! mailing list; added literals, array markers, procedure markers; ! changed numbers and DSC comments. ! Dec 2, 1998 version 0.1, written by Himanshu Gohel, gohel@acm.org ! ! BEWARE - there are very long lines (up to 2000 chars) containing PS Operators ! ! In NEdit Version 5.0.1 and beyond, load this pattern by starting nedit with: ! ! nedit -import ! ! Then, check that the patterns were loaded correctly, and choose Save Defaults ! from the Preferences menu. The new patterns will now be incorporated into ! your own .nedit file, so the next time you start NEdit, you will no longer ! need to use -import. ! ! In version 5.0, without -import, you must edit your .nedit file by hand and ! add the contents of each resource below to the corresponding list in your ! .nedit file. Be sure to separate new entries with \n, and continue resource ! strings by escaping all newlines within a resource value with \ (backslash), ! leaving only the last line of the resource value not ending in \. nedit.languageModes: PostScript:.ps .PS .eps .EPS .epsf .epsi:"%!":::::"/%(){}[]<>" nedit.highlightPatterns: \ PostScript:1:0{\n\ DSCcomment:"^%[%|!]":"$"::Preprocessor::\n\ Comment:"%":"$"::Comment::\n\ string:"\\(":"\\)"::String::\n\ string esc chars:"\\\\(n|r|t|b|f|\\\\|\\(|\\)|[0-9][0-9]?[0-9]?)?":::String1:string:\n\ string2:"\\(":"\\)"::String:string:\n\ string2 esc chars:"\\\\(n|r|t|b|f|\\\\|\\(|\\)|[0-9][0-9]?[0-9]?)?":::String1:string2:\n\ string3:"\\(":"\\)"::String:string2:\n\ string3 esc chars:"\\\\(n|r|t|b|f|\\\\|\\(|\\)|[0-9][0-9]?[0-9]?)?":::String1:string3:\n\ ASCII 85 string:"\\<~":"~\\>"::String::\n\ ASCII 85 esc chars:"\\\\\\n":::String1:ASCII 85 string:\n\ ASCII 85 OK chars:"[!-u,z]":::String:ASCII 85 string:\n\ ASCII 85 bad chars:"[^(!-u|z|\\\\)]":::Plain:ASCII 85 string:\n\ Dictionary:"(\\<\\<|\\>\\>)":::Storage Type::\n\ hex string:"\\<":"\\>"::String::\n\ hex esc chars:"\\\\\\n":::String1:hex string:\n\ hex OK chars:"[0-9,a-f,A-F]":::String:hex string:\n\ hex bad chars:"[^(0-9|a-f|A-F)]":::Plain:hex string:\n\ Literal:"/[^/%{}\\(\\)\\<\\>\\[\\]\\f\\n\\r\\t ]*":::Text Key::\n\ Number:"<((([2-9]|[1-2][0-9]|3[0-6])#[0-9a-zA-Z]*)|(((\\+|-)?[0-9]+\\.?[0-9]*)|((\\+|-)?\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)>":::Numeric Const::D\n\ Array:"[\\[\\]]":::Storage Type::D\n\ Procedure:"[{}]":::Subroutine::D\n\ Operator1:"<(=|==|$error|abs|add|aload|anchorsearch|and|arc|arcn|arcto|array|ashow|astore|atan|awidthshow|begin|bind|bitshift|bytesavailable|cachestatus|ceiling|charpath|clear|cleardictstack|cleartomark|clip|clippath|closefile|closepath|concat|concatmatrix|copy|copypage|cos|count|countdictstack|countexecstack|counttomark|currentdash|currentdict|currentfile|currentflat|currentfont|currentgray|currenthsbcolor|currentlinecap|currentlinejoin|currentlinewidth|currentmatrix|currentmiterlimit|currentpoint|currentrgbcolor|currentscreen|currenttransfer|curveto|cvi|cvlit|cvn|cvr|cvrs|cvs|cvx|def|defaultmatrix|definefont|dict|dictstack|div|dtransform|dup|echo|eexec|end|eoclip|eofill|eq|erasepage|errordict|exch|exec|execstack|executeonly|executive|exit|exitserver|exp|false|file|fill|findfont|flattenpath|floor|flush|flushfile|FontDirectory|for|forall|ge|get|getinterval|grestore|grestoreall|gsave|gt|handleerror|identmatrix|idiv|idtransform|if|ifelse|image|imagemask|index|initclip|initgraphics|initmatrix|internaldict|invertmatrix|itransform|known|kshow|le|length|lineto|ln|load|log|loop|lt|makefont|mark|matrix|maxlength|mod|moveto|mul|ne|neg|newpath|noaccess|not|null|nulldevice|or|pathbbox|pathforall|pop|print|prompt|pstack|put|putinterval|quit|rand|rcheck|rcurveto|read|readhexstring|readline|readonly|readstring|repeat|resetfile|restore|reversepath|rlineto|rmoveto|roll|rotate|round|rrand|run|save|scale|scalefont|search|serverdict|setcachedevice|setcachelimit|setcharwidth|setdash|setflat|setfont|setgray|sethsbcolor|setlinecap|setlinejoin|setlinewidth|setmatrix|setmiterlimit|setrgbcolor|setscreen|settransfer|show|showpage|sin|sqrt|srand|stack|StandardEncoding|start|status|statusdict|stop|stopped|store|string|stringwidth|stroke|strokepath|sub|systemdict|token|transform|translate|true|truncate|type|userdict|usertime|version|vmstatus|wcheck|where|widthshow|write|writehexstring|writestring|xcheck|xor)>":::Keyword::D\n\ Operator2:"<(arct|colorimage|cshow|currentblackgeneration|currentcacheparams|currentcmykcolor|currentcolor|currentcolorrendering|currentcolorscreen|currentcolorspace|currentcolortransfer|currentdevparams|currentglobal|currentgstate|currenthalftone|currentobjectformat|currentoverprint|currentpacking|currentpagedevice|currentshared|currentstrokeadjust|currentsystemparams|currentundercolorremoval|currentuserparams|defineresource|defineuserobject|deletefile|execform|execuserobject|filenameforall|fileposition|filter|findencoding|findresource|gcheck|globaldict|GlobalFontDirectory|glyphshow|gstate|ineofill|infill|instroke|inueofill|inufill|inustroke|ISOLatin1Encoding|languagelevel|makepattern|packedarray|printobject|product|realtime|rectclip|rectfill|rectstroke|renamefile|resourceforall|resourcestatus|revision|rootfont|scheck|selectfont|serialnumber|setbbox|setblackgeneration|setcachedevice2|setcacheparams|setcmykcolor|setcolor|setcolorrendering|setcolorscreen|setcolorspace|setcolortransfer|setdevparams|setfileposition|setglobal|setgstate|sethalftone|setobjectformat|setoverprint|setpacking|setpagedevice|setpattern|setshared|setstrokeadjust|setsystemparams|setucacheparams|setundercolorremoval|setuserparams|setvmthreshold|shareddict|SharedFontDirectory|startjob|uappend|ucache|ucachestatus|ueofill|ufill|undef|undefinefont|undefineresource|undefineuserobject|upath|UserObjects|ustroke|ustrokepath|vmreclaim|writeobject|xshow|xyshow|yshow)>":::Keyword::D\n\ Operator3:"<(GetHalftoneName|GetPageDeviceName|GetSubstituteCRD|StartData|addglyph|beginbfchar|beginbfrange|begincidchar|begincidrange|begincmap|begincodespacerange|beginnotdefchar|beginnotdefrange|beginrearrangedfont|beginusematrix|cliprestore|clipsave|composefont|currentsmoothness|currenttrapparams|endbfchar|endbfrange|endcidchar|endcidrange|endcmap|endcodespacerange|endnotdefchar|endnotdefrange|endrearrangedfont|endusematrix|findcolorrendering|removeall|removeglyphs|setsmoothness|settrapparams|settrapzone|shfill|usecmap|usefont)>":::Keyword::D\n\ Old operator:"<(condition|currentcontext|currenthalftonephase|defineusername|detach|deviceinfo|eoviewclip|fork|initviewclip|join|lock|monitor|notify|rectviewclip|sethalftonephase|viewclip|viewclippath|wait|wtranslation|yield)>":::Keyword::D\n\ }