3 " Maintainer: Alex Poylisher <sher@komkon.org>
4 " Last Change: 2001 May 10
6 " The SETL documentation is at "http://www-robotics.eecs.lehigh.edu/~bacon/setl-doc.html".
8 " For version 5.x: Clear all syntax items
9 " For version 6.x: Quit when a syntax file was already loaded
12 elseif exists("b:current_syntax")
16 " SETL is entirely case-insensitive.
19 " The SETL reserved words.
21 syn keyword setlKeyword const var
23 syn keyword setlConditional case else elsif if then
25 syn keyword setlKeyword end
27 syn keyword setlSpecial om last_error command_line command_name
28 syn keyword setlInclude #include
29 syn keyword setlBoolean true false
31 syn keyword setlOperator abs accept acos and any arb asin assert atan
32 syn keyword setlOperator atan2 bit_and bit_not bit_or bit_xor
33 syn keyword setlOperator call callout ceil char chdir clear_error
34 syn keyword setlOperator clock close cos cosh date denotype
35 syn keyword setlOperator div domain dup dup2 eof exec exp fdate
36 syn keyword setlOperator fexists filename fileno filter fix float fixed
37 syn keyword setlOperator floating floor flush fork from fromb frome
38 syn keyword setlOperator fsize get geta getb getc getchar getegid
39 syn keyword setlOperator getenv geteuid getfile getgid getline getn
40 syn keyword setlOperator getpgrp gets getuid getwd gmark
41 syn keyword setlOperator gsub hex hostaddr hostname ichar impl
42 syn keyword setlOperator in incs ip_addresses ip_names is_atom
43 syn keyword setlOperator is_boolean is_integer is_map is_mmap
44 syn keyword setlOperator is_numeric is_om is_real is_routine
45 syn keyword setlOperator is_set is_smap is_string is_tuple
46 syn keyword setlOperator is_open kill len less lessf lexists
47 syn keyword setlOperator link log lpad mark match max mem_alloc
48 syn keyword setlOperator mem_copy mem_free min mod newat not notany
49 syn keyword setlOperator notin npow nprint nprinta odd open
50 syn keyword setlOperator or pack_char pack_short pack_int pack_long
51 syn keyword setlOperator pack_float pack_double pack_long_double
52 syn keyword setlOperator peekc peekchar peer_address peer_name
53 syn keyword setlOperator peer_port pexists pid pipe pipe_from_child
54 syn keyword setlOperator port pow pretty print printa pump put
55 syn keyword setlOperator puta putb putc putchar putenv putfile
56 syn keyword setlOperator putline outs random range rany rbreak rlen
57 syn keyword setlOperator rmatch rnotany rspan read reada readlink
58 syn keyword setlOperator reads recv recvfrom recv_fd rem reverse
59 syn keyword setlOperator rewind round routine rpad seek
60 syn keyword setlOperator select send sendto send_fd setenv setgid
61 syn keyword setlOperator setpgrp setrandom setuid set_intslash
62 syn keyword setlOperator set_magic shutdown sign sin sinh span
63 syn keyword setlOperator split sqrt store_char store_short store_int
64 syn keyword setlOperator store_long store_float store_double
65 syn keyword setlOperator store_long_double store_string store_c_string
66 syn keyword setlOperator str strad sub subset symlink system sys_read
67 syn keyword setlOperator sys_write tan tanh tie time tmpnam
68 syn keyword setlOperator to_lower to_upper tod type umask ungetc
69 syn keyword setlOperator ungetchar unhex unpack_char unpack_short
70 syn keyword setlOperator unpack_int unpack_long unpack_float
71 syn keyword setlOperator unpack_double unpack_long_double
72 syn keyword setlOperator unpretty unsetenv unstr wait whole with
73 syn keyword setlOperator write writea
75 syn keyword setlPreCondit begin body
76 syn keyword setlPreCondit program package procedure proc use
78 syn keyword setlRepeat exit for forall loop while until break
79 syn keyword setlRepeat continue do doing step pass
81 syn keyword setlStatement goto return
82 syn keyword setlStatement stop quit assert
85 syn keyword setlTodo contained TODO FIXME XXX
87 " Strings and characters.
88 syn region setlString1 start=+'+ skip=+''+ end=+'+
89 syn region setlString2 start=+"+ skip=+""+ end=+"+
92 syn match setlNumber "[+-]\=\<[0-9_]*\.\=[0-9_]*\>"
94 " Labels for the goto statement.
95 syn region setlLabel start="<<" end=">>"
98 syn region setlComment oneline contains=setlTodo start="--" end="$"
100 " Define the default highlighting.
101 " For version 5.7 and earlier: only when not done already
102 " For version 5.8 and later: only when an item doesn't have highlighting yet
103 if version >= 508 || !exists("did_setl_syntax_inits")
105 let did_setl_syntax_inits = 1
106 command -nargs=+ HiLink hi link <args>
108 command -nargs=+ HiLink hi def link <args>
111 HiLink setlBoolean Boolean
112 HiLink setlCharacter Character
113 HiLink setlComment Comment
114 HiLink setlConditional Conditional
115 HiLink setlInclude Include
116 HiLink setlKeyword Keyword
117 HiLink setlLabel Label
118 HiLink setlNumber Number
119 HiLink setlOperator Operator
120 HiLink setlPreCondit PreCondit
121 HiLink setlRepeat Repeat
122 HiLink setlSpecial Special
123 HiLink setlStatement Statement
124 HiLink setlString1 String
125 HiLink setlString2 String
126 HiLink setlStructure Structure
133 let b:current_syntax = "setl"