1" Vim syntax file
2" Language:	HTML/OS by Aestiva
3" Maintainer:	Jason Rust <jrust@westmont.edu>
4" URL:		http://www.rustyparts.com/vim/syntax/htmlos.vim
5" Info:		http://www.rustyparts.com/scripts.php
6" Last Change:	2003 May 11
7"
8
9" For version 5.x: Clear all syntax items
10" For version 6.x: Quit when a syntax file was already loaded
11if version < 600
12  syntax clear
13elseif exists("b:current_syntax")
14  finish
15endif
16
17if !exists("main_syntax")
18  let main_syntax = 'htmlos'
19endif
20
21if version < 600
22  so <sfile>:p:h/html.vim
23else
24  runtime! syntax/html.vim
25  unlet b:current_syntax
26endif
27
28syn cluster htmlPreproc add=htmlosRegion
29
30syn case ignore
31
32" Function names
33syn keyword	htmlosFunctions	expand sleep getlink version system ascii getascii syslock sysunlock cr lf clean postprep listtorow split listtocol coltolist rowtolist tabletolist	contained
34syn keyword	htmlosFunctions	cut \display cutall cutx cutallx length reverse lower upper proper repeat left right middle trim trimleft trimright count countx locate locatex replace replacex replaceall replaceallx paste pasteleft pasteleftx pasteleftall pasteleftallx pasteright pasterightall pasterightallx chopleft chopleftx chopright choprightx format concat	contained
35syn keyword	htmlosFunctions	goto exitgoto	contained
36syn keyword	htmlosFunctions	layout cols rows row items getitem putitem switchitems gettable delrow delrows delcol delcols append  merge fillcol fillrow filltable pastetable getcol getrow fillindexcol insindexcol dups nodups maxtable mintable maxcol mincol maxrow minrow avetable avecol averow mediantable mediancol medianrow producttable productcol productrow sumtable sumcol sumrow sumsqrtable sumsqrcol sumsqrrow reversecols reverserows switchcols switchrows inscols insrows insfillcol sortcol reversesortcol sortcoln reversesortcoln sortrow sortrown reversesortrow reversesortrown getcoleq getcoleqn getcolnoteq getcolany getcolbegin getcolnotany getcolnotbegin getcolge getcolgt getcolle getcollt getcolgen getcolgtn getcollen getcoltn getcolend getcolnotend getrowend getrownotend getcolin getcolnotin getcolinbegin getcolnotinbegin getcolinend getcolnotinend getrowin getrownotin getrowinbegin getrownotinbegin getrowinend getrownotinend	contained
37syn keyword	htmlosFunctions	dbcreate dbadd dbedit dbdelete dbsearch dbsearchsort dbget dbgetsort dbstatus dbindex dbimport dbfill dbexport dbsort dbgetrec dbremove dbpurge dbfind dbfindsort dbunique dbcopy dbmove dbkill dbtransfer dbpoke dbsearchx dbgetx	contained
38syn keyword	htmlosFunctions	syshtmlosname sysstartname sysfixfile fileinfo filelist fileindex domainname page browser regdomain username usernum getenv httpheader copy file ts row sysls syscp sysmv sysmd sysrd filepush filepushlink dirname	contained
39syn keyword	htmlosFunctions	mail to address subject netmail netmailopen netmailclose mailfilelist netweb netwebresults webpush netsockopen netsockread netsockwrite netsockclose	contained
40syn keyword	htmlosFunctions today time systime now yesterday tomorrow getday getmonth getyear getminute getweekday getweeknum getyearday getdate gettime getamorpm gethour addhours addminutes adddays timebetween timetill timefrom datetill datefrom mixedtimebetween mixeddatetill mixedtimetill mixedtimefrom mixeddatefrom nextdaybyweekfromdate nextdaybyweekfromtoday nextdaybymonthfromdate nextdaybymonthfromtoday nextdaybyyearfromdate nextdaybyyearfromtoday offsetdaybyweekfromdate offsetdaybyweekfromtoday offsetdaybymonthfromdate offsetdaybymonthfromtoday	contained
41syn keyword	htmlosFunctions isprivate ispublic isfile isdir isblank iserror iserror iseven isodd istrue isfalse islogical istext istag isnumber isinteger isdate istableeq istableeqx istableeqn isfuture ispast istoday isweekday isweekend issamedate iseq isnoteq isge isle ismod10 isvalidstring	contained
42syn keyword	htmlosFunctions celtof celtokel ftocel ftokel keltocel keltof cmtoin intocm fttom mtoft fttomile miletoft kmtomile miletokm mtoyd ydtom galtoltr ltrtogal ltrtoqt qttoltr gtooz oztog kgtolb lbtokg mttoton tontomt	contained
43syn keyword	htmlosFunctions max min abs sign inverse square sqrt cube roundsig round ceiling roundup floor rounddown roundeven rounddowneven roundupeven roundodd roundupodd rounddownodd random factorial summand fibonacci remainder mod radians degrees cos sin tan cotan secant cosecant acos asin atan exp power power10 ln log10 log sinh cosh tanh	contained
44syn keyword	htmlosFunctions xmldelete xmldeletex xmldeleteattr xmldeleteattrx xmledit xmleditx xmleditvalue xmleditvaluex xmleditattr xmleditattrx xmlinsertbefore xmlinsertbeforex smlinsertafter xmlinsertafterx xmlinsertattr xmlinsertattrx smlget xmlgetx xmlgetvalue xmlgetvaluex xmlgetattrvalue xmlgetattrvaluex xmlgetrec xmlgetrecx xmlgetrecattrvalue xmlgetrecattrvaluex xmlchopleftbefore xmlchopleftbeforex xmlchoprightbefore xmlchoprightbeforex xmlchopleftafter xmlchopleftafterx xmlchoprightafter xmlchoprightafterx xmllocatebefore xmllocatebeforex xmllocateafter xmllocateafterx	contained
45
46" Type
47syn keyword	htmlosType	int str dol flt dat grp	contained
48
49" StorageClass
50syn keyword	htmlosStorageClass	locals	contained
51
52" Operator
53syn match	htmlosOperator	"[-=+/\*!]"	contained
54syn match	htmlosRelation	"[~]"	contained
55syn match	htmlosRelation	"[=~][&!]"	contained
56syn match	htmlosRelation	"[!=<>]="	contained
57syn match	htmlosRelation	"[<>]"	contained
58
59" Comment
60syn region	htmlosComment	start="#" end="/#"	contained
61
62" Conditional
63syn keyword	htmlosConditional	if then /if to else elif	contained
64syn keyword	htmlosConditional	and or nand nor xor not	contained
65" Repeat
66syn keyword	htmlosRepeat	while do /while for /for	contained
67
68" Keyword
69syn keyword	htmlosKeyword	name value step do rowname colname rownum	contained
70
71" Repeat
72syn keyword	htmlosLabel	case matched /case switch	contained
73
74" Statement
75syn keyword	htmlosStatement     break exit return continue	contained
76
77" Identifier
78syn match	htmlosIdentifier	"\h\w*[\.]*\w*"	contained
79
80" Special identifier
81syn match	htmlosSpecialIdentifier	"[\$@]"	contained
82
83" Define
84syn keyword	htmlosDefine	function overlay	contained
85
86" Boolean
87syn keyword	htmlosBoolean	true false	contained
88
89" String
90syn region	htmlosStringDouble	keepend matchgroup=None start=+"+ end=+"+ contained
91syn region	htmlosStringSingle	keepend matchgroup=None start=+'+ end=+'+ contained
92
93" Number
94syn match htmlosNumber	"-\=\<\d\+\>"	contained
95
96" Float
97syn match htmlosFloat	"\(-\=\<\d+\|-\=\)\.\d\+\>"	contained
98
99" Error
100syn match htmlosError	"ERROR"	contained
101
102" Parent
103syn match     htmlosParent       "[({[\]})]"     contained
104
105" Todo
106syn keyword	htmlosTodo TODO Todo todo	contained
107
108syn cluster	htmlosInside	contains=htmlosComment,htmlosFunctions,htmlosIdentifier,htmlosSpecialIdentifier,htmlosConditional,htmlosRepeat,htmlosLabel,htmlosStatement,htmlosOperator,htmlosRelation,htmlosStringSingle,htmlosStringDouble,htmlosNumber,htmlosFloat,htmlosError,htmlosKeyword,htmlosType,htmlosBoolean,htmlosParent
109
110syn cluster	htmlosTop	contains=@htmlosInside,htmlosDefine,htmlosError,htmlosStorageClass
111
112syn region	 htmlosRegion	keepend matchgroup=Delimiter start="<<" skip=+".\{-}?>.\{-}"\|'.\{-}?>.\{-}'\|/\*.\{-}?>.\{-}\*/+ end=">>" contains=@htmlosTop
113syn region	 htmlosRegion	keepend matchgroup=Delimiter start="\[\[" skip=+".\{-}?>.\{-}"\|'.\{-}?>.\{-}'\|/\*.\{-}?>.\{-}\*/+ end="\]\]" contains=@htmlosTop
114
115
116" sync
117if exists("htmlos_minlines")
118  exec "syn sync minlines=" . htmlos_minlines
119else
120  syn sync minlines=100
121endif
122
123" Define the default highlighting.
124" For version 5.7 and earlier: only when not done already
125" For version 5.8 and later: only when an item doesn't have highlighting yet
126if version >= 508 || !exists("did_htmlos_syn_inits")
127  if version < 508
128    let did_htmlos_syn_inits = 1
129    command -nargs=+ HiLink hi link <args>
130  else
131    command -nargs=+ HiLink hi def link <args>
132  endif
133
134  " The default methods for highlighting.  Can be overridden later
135  HiLink	 htmlosSpecialIdentifier	Operator
136  HiLink	 htmlosIdentifier	Identifier
137  HiLink	 htmlosStorageClass	StorageClass
138  HiLink	 htmlosComment	Comment
139  HiLink	 htmlosBoolean	Boolean
140  HiLink	 htmlosStringSingle	String
141  HiLink	 htmlosStringDouble	String
142  HiLink	 htmlosNumber	Number
143  HiLink	 htmlosFloat	Float
144  HiLink	 htmlosFunctions	Function
145  HiLink	 htmlosRepeat	Repeat
146  HiLink	 htmlosConditional	Conditional
147  HiLink	 htmlosLabel	Label
148  HiLink	 htmlosStatement	Statement
149  HiLink	 htmlosKeyword	Statement
150  HiLink	 htmlosType	Type
151  HiLink	 htmlosDefine	Define
152  HiLink	 htmlosParent	Delimiter
153  HiLink	 htmlosError	Error
154  HiLink	 htmlosTodo	Todo
155  HiLink	htmlosOperator	Operator
156  HiLink	htmlosRelation	Operator
157
158  delcommand HiLink
159endif
160let b:current_syntax = "htmlos"
161
162if main_syntax == 'htmlos'
163  unlet main_syntax
164endif
165
166" vim: ts=8 sw=2
167