3 " Maintainer: Rafal Sulejman <rms@poczta.onet.pl>
4 " Last change: 21 Jun 2000
6 " For version 5.x: Clear all syntax items
7 " For version 6.x: Quit when a syntax file was already loaded
10 elseif exists("b:current_syntax")
15 " A bunch of useful SNOBOL keywords
16 syn match snobol4Label "^[^ \t]*"
17 syn keyword snobol4Statement OUTPUT TERMINAL SCREEN INPUT
18 syn keyword snobol4Function ARB ARBNO POS RPOS TAB TRIM SIZE
19 syn keyword snobol4Function RTAB REPLACE DUPL DATATYPE CONVERT
20 syn keyword snobol4Function LEN DEFINE TRACE STOPTR CODE REM
21 syn keyword snobol4Function DIFFER IDENT ARRAY TABLE
22 syn keyword snobol4Function GT GE LE EQ LT NE LGT
23 syn keyword snobol4Function ANY NOTANY BREAK SPAN DATE
24 syn keyword snobol4Function SUBSTR OPSYN INTEGER REMDR BAL
25 syn keyword snobol4Todo contained TODO
26 syn match snobol4Keyword "&TRIM\|&FULLSCAN\|&MAXLNGTH\|&ANCHOR\|&ERRLIMIT\|&ERRTEXT"
27 syn match snobol4Keyword "&ALPHABET\|&LCASE\|&UCASE\|&DUMP\|&TRACE"
28 "integer number, or floating point number without a dot.
29 syn match snobol4Number "\<\d\+\>"
30 "floating point number, with dot
31 syn match snobol4Number "\<\d\+\.\d*\>"
32 "floating point number, starting with a dot
33 syn match snobol4Number "\.\d\+\>"
35 " String and Character contstants
36 syn region snobol4String start=+"+ skip=+\\\\\|\\"+ end=+"+
37 syn region snobol4String start=+[^a-zA-Z0-9]'+ skip=+\\\\\|\\"+ end=+'+
39 syn match snobol4MathsOperator "-\|=\|[:<>+\*^/\\]\||\|"
40 syn match snobol4Comment "^\*.*$"
42 " Define the default highlighting.
43 " For version 5.7 and earlier: only when not done already
44 " For version 5.8 and later: only when an item doesn't have highlighting yet
45 if version >= 508 || !exists("did_snobol4_syntax_inits")
47 let did_snobol4_syntax_inits = 1
48 command -nargs=+ HiLink hi link <args>
50 command -nargs=+ HiLink hi def link <args>
53 HiLink snobol4Label Label
54 HiLink snobol4Conditional Conditional
55 HiLink snobol4Repeat Repeat
56 HiLink snobol4Number Number
57 HiLink snobol4Error Error
58 HiLink snobol4Statement Statement
59 HiLink snobol4String String
60 HiLink snobol4Comment Comment
61 HiLink snobol4Special Special
62 HiLink snobol4Todo Todo
63 HiLink snobol4Function Identifier
64 HiLink snobol4Keyword Keyword
65 HiLink snobol4MathsOperator Operator
70 let b:current_syntax = "snobol4"