PageRenderTime 53ms CodeModel.GetById 25ms app.highlight 22ms RepoModel.GetById 1ms app.codeStats 0ms

/misc/vim/syntax/factor.vim

http://github.com/abeaumont/factor
Vim Script | 322 lines | 298 code | 24 blank | 0 comment | 5 complexity | 7736cd3dd904b340d9a7eaf626f02c51 MD5 | raw file
  1
  2" Vim syntax file
  3" Language: Factor
  4" Maintainer: Alex Chapman <chapman.alex@gmail.com>
  5" Last Change: 2012 Jul 11
  6" To run: USING: html.templates html.templates.fhtml ; "resource:misc/factor.vim.fgen" <fhtml> call-template
  7
  8" For version 5.x: Clear all syntax items
  9" For version 6.x: Quit when a syntax file was already loaded
 10if version < 600
 11    syntax clear
 12elseif exists("b:current_syntax")
 13    finish
 14endif
 15
 16" Factor is case sensitive.
 17syn case match
 18
 19" Make all of these characters part of a word (useful for skipping over words with w, e, and b)
 20if version >= 600
 21    setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255
 22else
 23    set iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255
 24endif
 25
 26syn cluster factorCluster contains=factorComment,factorFrySpecifier,factorKeyword,factorRepeat,factorConditional,factorBoolean,factorBreakpoint,factorDeclaration,factorCallQuotation,factorExecute,factorCallNextMethod,factorString,factorTriString,factorSbuf,@factorNumber,@factorNumErr,factorDelimiter,factorChar,factorBackslash,factorMBackslash,factorLiteral,factorLiteralBlock,@factorWordOps,factorAlien,factorSlot,factorTuple,factorError,factorStruct
 27
 28syn match factorTodo /\(TODO\|FIXME\|XXX\):\=/ contained
 29syn match factorComment /\<#\?!\>.*/ contains=factorTodo,@Spell
 30syn match factorShebang /\%\^#!.*/ display
 31syn match factorShebangErr /\%\^#!\S\+/
 32
 33syn cluster factorDefnContents contains=@factorCluster,factorStackEffect,factorLiteralStackEffect,factorArray0,factorQuotation0
 34
 35syn region factorDefn matchgroup=factorDefnDelims start=/\<\(SYNTAX\|\(MACRO\|MEMO\|TYPED\)\?:\?\):\s\+\S\+\>/ end=/\<;\>/ contains=@factorDefnContents
 36syn region factorMethod matchgroup=factorMethodDelims start=/\<M::\?\s\+\S\+\s\+\S\+\>/ end=/\<;\>/ contains=@factorDefnContents
 37syn region factorGeneric matchgroup=factorGenericDelims start=/\<\(GENERIC\|MATH\):\s\+\S\+\>/ end=/$/ contains=factorStackEffect
 38syn region factorGenericN matchgroup=factorGenericNDelims start=/\<GENERIC#\s\+\S\+\s\+\d\+\>/ end=/$/ contains=factorStackEffect
 39
 40syn region factorPrivateDefn matchgroup=factorPrivateDefnDelims start=/\<\(SYNTAX\|\(MACRO\|MEMO\|TYPED\)\?:\?\):\s\+\S\+\>/ end=/\<;\>/ contains=@factorDefnContents contained
 41syn region factorPrivateMethod matchgroup=factorPrivateMethodDelims start=/\<M::\?\s\+\S\+\s\+\S\+\>/ end=/\<;\>/ contains=@factorDefnContents contained
 42syn region factorPGeneric matchgroup=factorPGenericDelims start=/\<\(GENERIC\|MATH\):\s\+\S\+\>/ end=/$/ contains=factorStackEffect contained
 43syn region factorPGenericN matchgroup=factorPGenericNDelims start=/\<GENERIC#\s\+\S\+\s\+\d\+\>/ end=/$/ contains=factorStackEffect
 44
 45syn region None matchgroup=factorPrivate start=/\<<PRIVATE\>/ end=/\<PRIVATE>\>/ contains=@factorDefnContents,factorPrivateDefn,factorPrivateMethod,factorPGeneric,factorPGenericN
 46
 47
 48syn keyword factorBoolean f t
 49syn keyword factorBreakpoint B
 50syn keyword factorFrySpecifier @ _ contained
 51syn keyword factorDeclaration delimiter deprecated final flushable foldable inline recursive
 52syn match factorCallQuotation /\<call(\s\+\(\S*\s\+\)*--\(\s\+\S*\)*\s\+)\>/ contained contains=factorStackEffect
 53syn match factorExecute /\<execute(\s\+\(\S*\s\+\)*--\(\s\+\S*\)*\s\+)\>/ contained contains=factorStackEffect
 54syn keyword factorCallNextMethod call-next-method
 55
 56syn keyword factorKeyword or 4drop 2bi 2tri while wrapper nip bi* wrapper? callstack>array 4dip die dupd both? callstack callstack? 3dup hashcode same? tri@ pick curry build ?execute 3bi prepose ?if clone >boolean eq? tri* ? = swapd 2over 2keep 3keep clear 2dup when not tuple? dup 2bi* 2tri* call 4keep tri-curry object bi@ do unless* if* loop bi-curry* drop when* assert= retainstack assert? -rot execute 2bi@ 2tri@ with boa either? 3drop bi curry? datastack until 3dip over 3curry tri-curry* tri-curry@ swap and 2nip throw bi-curry (clone) hashcode* compose 2dip if 3tri unless compose? tuple 2curry keep 4dup equal? assert tri 2drop most <wrapper> boolean? identity-hashcode identity-tuple? null new dip bi-curry@ rot identity-tuple xor boolean
 57syn keyword factorKeyword ?at assoc? assoc-clone-like assoc= delete-at* assoc-partition extract-keys new-assoc value? assoc-size map>assoc push-at assoc-differ assoc-like key? assoc-intersect assoc-refine assoc-union! assoc-union assoc-combine at* assoc-filter! assoc-empty? at+ assoc-subset? set-at assoc-hashcode sift-values assoc-all? change-at assoc-each assoc-diff sift-keys zip values value-at rename-at inc-at enum? at cache assoc>map assoc-diff! <enum> assoc assoc-map enum value-at* assoc-map-as >alist assoc-filter-as clear-assoc assoc-stack maybe-set-at assoc-filter 2cache delete-at assoc-find substitute keys assoc-any? unzip
 58syn keyword factorKeyword case execute-effect no-cond no-case? 3cleave>quot 2cleave cond>quot wrong-values? 4cleave no-cond? cleave>quot no-case shallow-spread>quot case>quot 3cleave wrong-values to-fixed-point alist>quot case-find cond cleave call-effect 2cleave>quot recursive-hashcode linear-case-quot spread deep-spread>quot 4cleave>quot
 59syn keyword factorKeyword number= if-zero next-power-of-2 each-integer ?1+ fp-special? imaginary-part unless-zero float>bits number? fp-infinity? bignum? fp-snan? denominator fp-bitwise= * + power-of-2? - u>= / >= bitand log2-expects-positive neg? < log2 > out-of-fixnum-range integer? number bits>double 2/ zero? (find-integer) out-of-fixnum-range? bits>float float? shift ratio? even? ratio fp-sign bitnot >fixnum complex? /i integer>fixnum /f when-zero sgn >bignum next-float u< u> mod recip rational find-last-integer >float (all-integers?) 2^ times integer fixnum? neg fixnum sq bignum (each-integer) bit? fp-qnan? find-integer complex <fp-nan> real double>bits bitor rem fp-nan-payload all-integers? real-part log2-expects-positive? prev-float align unordered? float fp-nan? abs bitxor integer>fixnum-strict u<= odd? <= /mod >integer real? rational? numerator
 60syn keyword factorKeyword member-eq? append assert-sequence= find-last-from selector-for clone-like 3sequence assert-sequence? map-as trim-head-slice last-index-from reversed index-from cut* pad-tail remove-eq! concat-as but-last snip trim-tail nths nth sequence slice? <slice> partition remove-nth tail-slice empty? tail* if-empty member? virtual-sequence? find-from set-length drop-prefix unclip-last-slice iota unclip bounds-error? map-sum accumulate-as map start midpoint@ ?first rest-slice prepend-as prepend fourth sift accumulate! new-sequence ?last follow map! like first4 1sequence reverse slice unless-empty collector padding virtual@ repetition? set-last index 4sequence max-length set-second immutable-sequence first2 first3 supremum reduce-index replicate-as unclip-slice suffix! insert-nth trim-tail-slice tail 3append short count suffix concat flip find-index filter immutable? reverse! sum 2sequence map-integers delete-all start* indices snip-slice check-slice sequence? head map-find filter! append-as halves selector sequence= collapse-slice interleave 2map reduce filter-as binary-reduce ?second slice-error? product bounds-check? bounds-check harvest immutable virtual-exemplar find produce remove pad-head last replicate set-fourth cartesian-product remove-eq shorten cartesian-map cartesian-each reversed? find-index-from map-find-last 3map-as shorter? 3map find-last head-slice pop* 2map-as tail-slice* but-last-slice 2map-reduce iota? accumulate each append! cut-slice new-resizable each-index head-slice* sequence-hashcode pop set-nth ?nth second join when-empty immutable-sequence? <reversed> all? 3append-as virtual-sequence subseq? remove-nth! push-either new-like length last-index collector-for 2selector push-if 2all? lengthen assert-sequence copy map-reduce move third first 3each tail? set-first prefix bounds-error any? <repetition> trim-slice exchange surround 2reduce cut change-nth min-length set-third produce-as push-all head? delete-slice rest sum-lengths 2each head* infimum remove! glue slice-error subseq trim replace-slice trim-head push map-index unclip-last mismatch repetition
 61syn keyword factorKeyword global +@ set-namestack change-global with-variable on toggle set dec initialize namestack get get-global change init-namespaces with-scope off set-global namespace with-variables inc counter is-global make-assoc with-global
 62syn keyword factorKeyword <array> 2array 3array pair >array 1array 4array pair? array resize-array array?
 63syn keyword factorKeyword +character+ bad-seek-type? each-morsel readln stream-seek read print with-output-stream with-output>error each-stream-block-slice contents input-stream? stream-read-partial-unsafe write1 stream-write1 (stream-contents-by-length-or-block) stream-copy stream-element-type with-input-stream with-error-stream* stream-print stream-contents stream-read with-output+error-stream* stream-tell tell-output bl seek-output with-input-output+error-streams* bad-seek-type nl stream-nl stream-length write flush with-error>output +byte+ with-input-output+error-streams stream-read-into with-output+error-stream stream-flush read1 seek-absolute? stream-read1 read-into read-partial-into each-block-size lines stream-readln stream-read-until invalid-read-buffer seek-end each-block-slice with-output-stream* stream-lines stream-read-unsafe seek-absolute output-stream? each-line (stream-contents-by-element) stream-seekable? invalid-read-buffer? (stream-contents-by-block) with-streams seek-input seek-relative? stream-read-partial-into input-stream stream-write with-error-stream read-partial stream-copy* seek-end? seek-relative with-input-stream* error-stream read-until stream-contents* tell-input each-block with-streams* output-stream (stream-contents-by-length) stream-read-partial each-stream-block each-stream-line
 64syn keyword factorKeyword resize-string >string <string> 1string string string?
 65syn keyword factorKeyword vector? <vector> ?push vector >vector 1vector
 66syn keyword factorKeyword with-return restarts return-continuation with-datastack recover in-callback? rethrow-restarts throw-continue <restart> ifcc original-error error-in-thread cleanup restart? ignore-errors compute-restarts attempt-all-error error-thread continue <continuation> attempt-all-error? condition? <condition> throw-restarts error restart thread-error-hook continue-with current-continuation continuation callcc1 rethrow error-continuation condition callcc0 callback-error-hook continuation? attempt-all return
 67
 68
 69syn cluster factorReal          contains=factorInt,factorFloat,factorPosRatio,factorNegRatio,factorBinary,factorHex,factorOctal
 70syn cluster factorNumber        contains=@factorReal,factorComplex
 71syn cluster factorNumErr        contains=factorBinErr,factorHexErr,factorOctErr
 72syn match   factorInt           /\<-\=[0-9]\([0-9,]*[0-9]\)\?\([eE]\([+-]\)\?[0-9]\+\)\?\>/
 73syn match   factorFloat         /\<-\=\([0-9,]*[0-9]\)\?\(\.\(\([0-9,]*[0-9]\+\)\?\([eE]\([+-]\)\?[0-9]\+\)\?\)\?\)\?\>/
 74syn match   factorPosRatio      /\<+\=[0-9]\([0-9,]*[0-9]\)\?\(+[0-9]\([0-9,]*[0-9]\+\)\?\)\?\/-\=[0-9]\([0-9,]*[0-9]\+\)\?\.\?\>/
 75syn match   factorNegRatio      /\<\-[0-9]\([0-9,]*[0-9]\)\?\(\-[0-9]\([0-9,]*[0-9]\+\)\?\)\?\/-\=[0-9]\([0-9,]*[0-9]\+\)\?\.\?\>/
 76syn region  factorComplex       start=/\<C{\>/ end=/\<}\>/ contains=@factorReal
 77syn match   factorBinErr        /\<-\=0b[01,]*[^01 ]\S*\>/
 78syn match   factorBinary        /\<-\=0b[01,]\+\>/
 79syn match   factorHexErr        /\<-\=0x\(,\S*\|\S*,\|[-0-9a-fA-Fp,]*[^-0-9a-fA-Fp, ]\S*\)\>/
 80syn match   factorHex           /\<-\=0x[0-9a-fA-F]\([0-9a-fA-F,]*[0-9a-fA-F]\)\?\(\.[0-9a-fA-F]\([0-9a-fA-F,]*[0-9a-fA-F]\)\?\)\?\(p-\=[0-9]\([0-9,]*[0-9]\)\?\)\?\>/
 81syn match   factorOctErr        /\<-\=0o\(,\S*\|\S*,\|[0-7,]*[^0-7, ]\S*\)\>/
 82syn match   factorOctal         /\<\+-\=0o[0-7,]\+\>/
 83syn match   factorNan           /\<NAN:\s\+[0-9a-fA-F]\([0-9a-fA-F,]*[0-9a-fA-F]\)\?\>/
 84
 85syn match   factorIn            /\<IN:\s\+\S\+\>/
 86syn match   factorUse           /\<USE:\s\+\S\+\>/
 87syn match   factorUnuse         /\<UNUSE:\s\+\S\+\>/
 88
 89syn match   factorChar          /\<CHAR:\s\+\S\+\>/
 90
 91syn match   factorBackslash     /\<\\\>\s\+\S\+\>/
 92syn match   factorMBackslash    /\<M\\\>\s\+\S\+\s\+\S\+\>/
 93syn match   factorLiteral       /\<\$\>\s\+\S\+\>/
 94syn region  factorLiteralBlock  start=/\<\$\[\>/ end=/\<\]\>/
 95
 96syn region  factorUsing         start=/\<USING:\>/       end=/;/
 97syn match   factorQualified     /\<QUALIFIED:\s\+\S\+\>/
 98syn match   factorQualifiedWith /\<QUALIFIED-WITH:\s\+\S\+\s\+\S\+\>/
 99syn region  factorExclude       start=/\<EXCLUDE:\>/     end=/;/
100syn region  factorFrom          start=/\<FROM:\>/        end=/;/
101syn match   factorRename        /\<RENAME:\s\+\S\+\s\+\S\+\s=>\s\+\S\+\>/
102syn region  factorSingletons    start=/\<SINGLETONS:\>/  end=/;/
103syn match   factorSymbol        /\<SYMBOL:\s\+\S\+\>/
104syn region  factorSymbols       start=/\<SYMBOLS:\>/     end=/;/
105syn region  factorConstructor2  start=/\<CONSTRUCTOR:\?/ end=/;/
106syn region  factorIntersection  start=/\<INTERSECTION:\>/ end=/\<;\>/
107syn region  factorTuple         start=/\<TUPLE:\>/ end=/\<;\>/
108syn region  factorError         start=/\<ERROR:\>/ end=/\<;\>/
109syn region  factorUnion         start=/\<UNION:\>/ end=/\<;\>/
110syn region  factorStruct        start=/\<\(UNION-STRUCT:\|STRUCT:\)\>/ end=/\<;\>/
111
112syn match   factorConstant      /\<CONSTANT:\s\+\S\+\>/
113syn match   factorAlias         /\<ALIAS:\s\+\S\+\s\+\S\+\>/
114syn match   factorSingleton     /\<SINGLETON:\s\+\S\+\>/
115syn match   factorPostpone      /\<POSTPONE:\s\+\S\+\>/
116syn match   factorDefer         /\<DEFER:\s\+\S\+\>/
117syn match   factorForget        /\<FORGET:\s\+\S\+\>/
118syn match   factorMixin         /\<MIXIN:\s\+\S\+\>/
119syn match   factorInstance      /\<INSTANCE:\s\+\S\+\s\+\S\+\>/
120syn match   factorHook          /\<HOOK:\s\+\S\+\s\+\S\+\>/ nextgroup=factorStackEffect skipwhite skipempty
121syn match   factorMain          /\<MAIN:\s\+\S\+\>/
122syn match   factorConstructor   /\<C:\s\+\S\+\s\+\S\+\>/
123syn match   factorAlien         /\<ALIEN:\s\+[0-9a-fA-F]\([0-9a-fA-F,]*[0-9a-fA-F]\)\?\>/
124syn match   factorSlot          /\<SLOT:\s\+\S\+\>/
125
126syn cluster factorWordOps       contains=factorConstant,factorAlias,factorSingleton,factorSingletons,factorSymbol,factorSymbols,factorPostpone,factorDefer,factorForget,factorMixin,factorInstance,factorHook,factorMain,factorConstructor
127
128"TODO:
129"misc:
130" HELP:
131" ARTICLE:
132"literals:
133" PRIMITIVE:
134
135"C interface:
136" C-ENUM:
137" FUNCTION:
138" TYPEDEF:
139" LIBRARY:
140"#\ "
141
142syn match factorEscape /\\\([\\astnr0e\"]\|u\x\{6}\|u{\S\+}\|x\x\{2}\)/ contained display
143syn region factorString start=/\<"/ skip=/\\"/ end=/"/ contains=factorEscape
144syn region factorTriString start=/\<"""/ skip=/\\"/ end=/"""/ contains=factorEscape
145syn region factorSbuf start=/\<[-a-zA-Z0-9]\+"\>/ skip=/\\"/ end=/"/
146
147syn region factorMultiString matchgroup=factorMultiStringDelims start=/\<STRING:\s\+\S\+\>/ end=/^;$/ contains=factorMultiStringContents
148syn match factorMultiStringContents /.*/ contained
149
150"syn match factorStackEffectErr /\<)\>/
151"syn region factorStackEffectErr start=/\<(\>/ end=/\<)\>/
152"syn region factorStackEffect start=/\<(\>/ end=/\<)\>/ contained
153syn match factorStackEffect /(\s\+\(\S*\s\+\)*--\(\s\+\S*\)*\s\+)\>/ contained contains=factorStackDelims,factorStackItems,factorStackVariables,factorCallExecuteDelim
154syn match factorLiteralStackEffect /((\s\+\(\S*\s\+\)*--\(\s\+\S*\)*\s\+))\>/ contained contains=factorStackDelims,factorStackItems,factorStackVariables,factorCallExecuteDelim
155syn match factorStackVariables contained "\<\.\.\S\+\>"
156syn match factorStackItems contained "\<\(\.\.\)\@!\S\+\>"
157syn keyword factorStackDelims contained ( ) (( )) --
158syn match factorCallExecuteDelim contained /(\s/
159
160"adapted from lisp.vim
161if exists("g:factor_norainbow")
162    syn region factorQuotation matchgroup=factorDelimiter start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/ matchgroup=factorDelimiter end=/\<\]\>/ contains=ALL
163else
164    syn region factorQuotation0           matchgroup=hlLevel0 start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/  end=/\<\]\>/ contains=@factorCluster,factorQuotation1,factorArray1
165    syn region factorQuotation1 contained matchgroup=hlLevel1 start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/  end=/\<\]\>/ contains=@factorCluster,factorQuotation2,factorArray2
166    syn region factorQuotation2 contained matchgroup=hlLevel2 start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/  end=/\<\]\>/ contains=@factorCluster,factorQuotation3,factorArray3
167    syn region factorQuotation3 contained matchgroup=hlLevel3 start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/  end=/\<\]\>/ contains=@factorCluster,factorQuotation4,factorArray4
168    syn region factorQuotation4 contained matchgroup=hlLevel4 start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/  end=/\<\]\>/ contains=@factorCluster,factorQuotation5,factorArray5
169    syn region factorQuotation5 contained matchgroup=hlLevel5 start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/  end=/\<\]\>/ contains=@factorCluster,factorQuotation6,factorArray6
170    syn region factorQuotation6 contained matchgroup=hlLevel6 start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/  end=/\<\]\>/ contains=@factorCluster,factorQuotation7,factorArray7
171    syn region factorQuotation7 contained matchgroup=hlLevel7 start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/  end=/\<\]\>/ contains=@factorCluster,factorQuotation8,factorArray8
172    syn region factorQuotation8 contained matchgroup=hlLevel8 start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/  end=/\<\]\>/ contains=@factorCluster,factorQuotation9,factorArray9
173    syn region factorQuotation9 contained matchgroup=hlLevel9 start=/\<\(\(\('\|\$\|\)\[\)\|\[\(let\||\)\)\>/  end=/\<\]\>/ contains=@factorCluster,factorQuotation0,factorArray0
174endif
175
176if exists("g:factor_norainbow")
177    syn region factorArray    matchgroup=factorDelimiter start=/\<\(\$\|[-a-zA-Z0-9]\+\)\?{\>/  matchgroup=factorDelimiter end=/\<}\>/ contains=ALL
178else
179    syn region factorArray0           matchgroup=hlLevel0 start=/\<\(\$\|[-a-zA-Z0-9]\+\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray1,factorQuotation1
180    syn region factorArray1 contained matchgroup=hlLevel1 start=/\<\(\$\|[-a-zA-Z0-9]\+\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray2,factorQuotation2
181    syn region factorArray2 contained matchgroup=hlLevel2 start=/\<\(\$\|[-a-zA-Z0-9]\+\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray3,factorQuotation3
182    syn region factorArray3 contained matchgroup=hlLevel3 start=/\<\(\$\|[-a-zA-Z0-9]\+\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray4,factorQuotation4
183    syn region factorArray4 contained matchgroup=hlLevel4 start=/\<\(\$\|[-a-zA-Z0-9]\+\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray5,factorQuotation5
184    syn region factorArray5 contained matchgroup=hlLevel5 start=/\<\(\$\|[-a-zA-Z0-9]\+\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray6,factorQuotation6
185    syn region factorArray6 contained matchgroup=hlLevel6 start=/\<\(\$\|[-a-zA-Z0-9]\+\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray7,factorQuotation7
186    syn region factorArray7 contained matchgroup=hlLevel7 start=/\<\(\$\|[-a-zA-Z0-9]\+\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray8,factorQuotation8
187    syn region factorArray8 contained matchgroup=hlLevel8 start=/\<\(\$\|[-a-zA-Z0-9]\+\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray9,factorQuotation9
188    syn region factorArray9 contained matchgroup=hlLevel9 start=/\<\(\$\|[-a-zA-Z0-9]\+\)\?{\>/ end=/\<}\>/ contains=@factorCluster,factorArray0,factorQuotation0
189endif
190
191syn match factorBracketErr /\<\]\>/
192syn match factorBracketErr /\<}\>/
193
194syn sync lines=100
195
196if version >= 508 || !exists("did_factor_syn_inits")
197    if version <= 508
198        let did_factor_syn_inits = 1
199        command -nargs=+ HiLink hi link <args>
200    else
201        command -nargs=+ HiLink hi def link <args>
202    endif
203
204    HiLink factorComment                Comment
205    HiLink factorShebang                PreProc
206    HiLink factorShebangErr             Error
207    HiLink factorStackEffect            Typedef
208    HiLink factorStackDelims            Delimiter
209    HiLink factorCallExecuteDelim       Delimiter
210    HiLink factorStackVariables         Special
211    HiLink factorStackItems             Identifier
212    HiLink factorLiteralStackEffect     Typedef
213    HiLink factorTodo                   Todo
214    HiLink factorInclude                Include
215    HiLink factorRepeat                 Repeat
216    HiLink factorConditional            Conditional
217    HiLink factorKeyword                Keyword
218    HiLink factorCallQuotation          Keyword
219    HiLink factorExecute                Keyword
220    HiLink factorCallNextMethod         Keyword
221    HiLink factorOperator               Operator
222    HiLink factorFrySpecifier           Operator
223    HiLink factorBoolean                Boolean
224    HiLink factorBreakpoint             Debug
225    HiLink factorDefnDelims             Typedef
226    HiLink factorMethodDelims           Typedef
227    HiLink factorGenericDelims          Typedef
228    HiLink factorGenericNDelims         Typedef
229    HiLink factorConstructor            Typedef
230    HiLink factorConstructor2           Typedef
231    HiLink factorPrivate                Special
232    HiLink factorPrivateDefnDelims      Special
233    HiLink factorPrivateMethodDelims    Special
234    HiLink factorPGenericDelims         Special
235    HiLink factorPGenericNDelims        Special
236    HiLink factorEscape                 SpecialChar
237    HiLink factorString                 String
238    HiLink factorTriString              String
239    HiLink factorSbuf                   String
240    HiLink factorMultiStringContents    String
241    HiLink factorMultiStringDelims      Typedef
242    HiLink factorBracketErr             Error
243    HiLink factorComplex                Number
244    HiLink factorPosRatio               Number
245    HiLink factorNegRatio               Number
246    HiLink factorBinary                 Number
247    HiLink factorBinErr                 Error
248    HiLink factorHex                    Number
249    HiLink factorHexErr                 Error
250    HiLink factorNan                    Number
251    HiLink factorOctal                  Number
252    HiLink factorOctErr                 Error
253    HiLink factorFloat                  Float
254    HiLink factorInt                    Number
255    HiLink factorUsing                  Include
256    HiLink factorQualified              Include
257    HiLink factorQualifiedWith          Include
258    HiLink factorExclude                Include
259    HiLink factorFrom                   Include
260    HiLink factorRename                 Include
261    HiLink factorUse                    Include
262    HiLink factorUnuse                  Include
263    HiLink factorIn                     Define
264    HiLink factorChar                   Character
265    HiLink factorDelimiter              Delimiter
266    HiLink factorBackslash              Special
267    HiLink factorMBackslash             Special
268    HiLink factorLiteral                Special
269    HiLink factorLiteralBlock           Special
270    HiLink factorDeclaration            Typedef
271    HiLink factorSymbol                 Define
272    HiLink factorSymbols                Define
273    HiLink factorConstant               Define
274    HiLink factorAlias                  Define
275    HiLink factorSingleton              Define
276    HiLink factorSingletons             Define
277    HiLink factorMixin                  Typedef
278    HiLink factorInstance               Typedef
279    HiLink factorHook                   Typedef
280    HiLink factorMain                   Define
281    HiLink factorPostpone               Define
282    HiLink factorDefer                  Define
283    HiLink factorForget                 Define
284    HiLink factorAlien                  Define
285    HiLink factorSlot                   Define
286    HiLink factorIntersection           Typedef
287    HiLink factorTuple                  Typedef
288    HiLink factorError                  Typedef
289    HiLink factorUnion                  Typedef
290    HiLink factorStruct                 Typedef
291
292    if &bg == "dark"
293        hi   hlLevel0 ctermfg=red         guifg=red1
294        hi   hlLevel1 ctermfg=yellow      guifg=orange1
295        hi   hlLevel2 ctermfg=green       guifg=yellow1
296        hi   hlLevel3 ctermfg=cyan        guifg=greenyellow
297        hi   hlLevel4 ctermfg=magenta     guifg=green1
298        hi   hlLevel5 ctermfg=red         guifg=springgreen1
299        hi   hlLevel6 ctermfg=yellow      guifg=cyan1
300        hi   hlLevel7 ctermfg=green       guifg=slateblue1
301        hi   hlLevel8 ctermfg=cyan        guifg=magenta1
302        hi   hlLevel9 ctermfg=magenta     guifg=purple1
303    else
304        hi   hlLevel0 ctermfg=red         guifg=red3
305        hi   hlLevel1 ctermfg=darkyellow  guifg=orangered3
306        hi   hlLevel2 ctermfg=darkgreen   guifg=orange2
307        hi   hlLevel3 ctermfg=blue        guifg=yellow3
308        hi   hlLevel4 ctermfg=darkmagenta guifg=olivedrab4
309        hi   hlLevel5 ctermfg=red         guifg=green4
310        hi   hlLevel6 ctermfg=darkyellow  guifg=paleturquoise3
311        hi   hlLevel7 ctermfg=darkgreen   guifg=deepskyblue4
312        hi   hlLevel8 ctermfg=blue        guifg=darkslateblue
313        hi   hlLevel9 ctermfg=darkmagenta guifg=darkviolet
314    endif
315
316    delcommand HiLink
317endif
318
319let b:current_syntax = "factor"
320
321" vim:set ft=vim sw=4:
322