996
|
1 " Vim syntax file
|
|
2 " Language: INTERCAL
|
|
3 " Maintainer: Stefan O'Rear <stefanor@cox.net>
|
|
4 " Last Change: 2008 Nov 29
|
|
5 " Remark: Use the Power of Vim to turn your INTERCAL programs into angry
|
|
6 " fruit salad.
|
|
7 "
|
|
8 " How to use this:
|
|
9 " * Put levdes.vim (this file) under ~/.vim/syntax (or similar directory for
|
|
10 " your system - usually C:\Program Files\Vim\vimfiles\syntax on Windows).
|
|
11 " * In your .vimrc, add this line:
|
|
12 " au BufRead,BufNewFile *.i set syntax=intercal
|
|
13 " Thereafter, any .i files you edit in (g)vim will use syntax highlighting.
|
|
14
|
|
15 if version < 600
|
|
16 syntax clear
|
|
17 elseif exists("b:current_syntax")
|
|
18 finish
|
|
19 endif
|
|
20
|
|
21 if !exists("main_syntax")
|
|
22 let main_syntax = 'ick'
|
|
23 endif
|
|
24
|
|
25
|
|
26 syn match ickIdentifier /DO\|PLEASE/
|
|
27
|
|
28 syn region ickComment start=/\(PLEASE\s*DO\s*\|PLEASE\s*\|DO\s*\|\)N\s*['O]\s*T/ end=/\(([ 0-9]*[0-9])\s*\)\?\(DO\|PLEASE\)/me=s-1
|
|
29
|
|
30 syn match ickKeyword /F\s*O\s*R\s*G\s*E\s*T/
|
|
31 syn match ickKeyword /G\s*I\s*V\s*E\s*U\s*P/
|
|
32 syn match ickKeyword /I\s*G\s*N\s*O\s*R\s*E/
|
|
33 syn match ickKeyword /N\s*E\s*X\s*T/
|
|
34 syn match ickKeyword /R\s*E\s*I\s*N\s*S\s*T\s*A\s*T\s*E/
|
|
35 syn match ickKeyword /R\s*E\s*M\s*E\s*M\s*B\s*E\s*R/
|
|
36 syn match ickKeyword /R\s*E\s*S\s*U\s*M\s*E/
|
|
37 syn match ickKeyword /R\s*E\s*T\s*R\s*I\s*E\s*V\s*E/
|
|
38 syn match ickKeyword /S\s*T\s*A\s*S\s*H/
|
|
39 syn match ickKeyword /W\s*R\s*I\s*T\s*E\s*I\s*N/
|
|
40 syn match ickKeywordAIS /A\s*G\s*A\s*I\s*N/
|
|
41 syn match ickKeywordAIS /G\s*O\s*A\s*H\s*E\s*A\s*D/
|
|
42 syn match ickKeywordAIS /G\s*O\s*B\s*A\s*C\s*K/
|
|
43 syn match ickKeywordAIS /M\s*A\s*Y\s*B\s*E/
|
|
44 syn match ickKeywordAIS /O\s*N\s*C\s*E/
|
|
45 syn match ickKeywordAIS /P\s*I\s*N/
|
|
46 syn match ickKeywordAIS /T\s*R\s*Y\s*A\s*G\s*A\s*I\s*N/
|
|
47 syn match ickKeywordAISGrn /G\s*O\s*I\s*N\s*G\s*A\s*H\s*E\s*A\s*D/
|
|
48 syn match ickKeywordAISGrn /G\s*O\s*I\s*N\s*G\s*B\s*A\s*C\s*K/
|
|
49 syn match ickKeywordAISGrn /N\s*E\s*X\s*T\s*I\s*N\s*G\s*F\s*R\s*O\s*M/
|
|
50 syn match ickKeywordAISGrn /P\s*I\s*N\s*N\s*I\s*N\s*G/
|
|
51 syn match ickKeywordAISGrn /T\s*R\s*Y\s*I\s*N\s*G\s*A\s*G\s*A\s*I\s*N/
|
|
52 syn match ickKeywordCLC /C\s*R\s*E\s*A\s*T\s*E/
|
|
53 syn match ickKeywordCLC /N\s*E\s*X\s*T\s*F\s*R\s*O\s*M/
|
|
54 syn match ickKeywordCLCExp /W\s*H\s*I\s*L\s*E/
|
|
55 syn match ickKeywordCLCGrn /C\s*O\s*M\s*M\s*E\s*N\s*T/
|
|
56 syn match ickKeywordCLCGrn /C\s*O\s*M\s*M\s*E\s*N\s*T\s*I\s*N\s*G/
|
|
57 syn match ickKeywordCLCGrn /C\s*O\s*M\s*M\s*E\s*N\s*T\s*S/
|
|
58 syn match ickKeywordCLCGrn /C\s*R\s*E\s*A\s*T\s*I\s*N\s*G/
|
|
59 syn match ickKeywordCLCGrn /C\s*R\s*E\s*A\s*T\s*I\s*O\s*N/
|
|
60 syn match ickKeywordCLCGrn /L\s*O\s*O\s*P\s*I\s*N\s*G/
|
|
61 syn match ickKeywordCLCGrn /W\s*H\s*I\s*L\s*I\s*N\s*G/
|
|
62 syn match ickKeywordESR /C\s*O\s*M\s*E\s*F\s*R\s*O\s*M/
|
|
63 syn match ickKeywordESRGrn /C\s*O\s*M\s*I\s*N\s*G\s*F\s*R\s*O\s*M/
|
|
64 syn match ickKeywordExp /B\s*Y/
|
|
65 syn match ickKeywordExp /S\s*U\s*B/
|
|
66 syn match ickKeywordGrn /R\s*E\s*M\s*E\s*M\s*B\s*E\s*R\s*I\s*N\s*G/
|
|
67 syn match ickKeywordGrn /R\s*E\s*I\s*N\s*S\s*T\s*A\s*T\s*I\s*N\s*G/
|
|
68 syn match ickKeyword /A\s*B\s*S\s*T\s*A\s*I\s*N\s*F\s*R\s*O\s*M/
|
|
69 syn match ickKeywordGrn /A\s*B\s*S\s*T\s*A\s*I\s*N\s*I\s*N\s*G/
|
|
70 syn match ickKeywordGrn /C\s*A\s*L\s*C\s*U\s*L\s*A\s*T\s*I\s*N\s*G/
|
|
71 syn match ickKeywordGrn /F\s*O\s*R\s*G\s*E\s*T\s*T\s*I\s*N\s*G/
|
|
72 syn match ickKeywordGrn /I\s*G\s*N\s*O\s*R\s*I\s*N\s*G/
|
|
73 syn match ickKeywordGrn /R\s*E\s*A\s*D\s*I\s*N\s*G\s*O\s*U\s*T/
|
|
74 syn match ickKeyword /R\s*E\s*A\s*D\s\+O\s*U\s*T/
|
|
75 syn match ickKeywordGrn /N\s*E\s*X\s*T\s*I\s*N\s*G/
|
|
76 syn match ickKeywordGrn /R\s*E\s*S\s*U\s*M\s*I\s*N\s*G/
|
|
77 syn match ickKeywordGrn /R\s*E\s*T\s*R\s*I\s*E\s*V\s*I\s*N\s*G/
|
|
78 syn match ickKeywordGrn /S\s*T\s*A\s*S\s*H\s*I\s*N\s*G/
|
|
79 syn match ickKeywordGrn /W\s*R\s*I\s*T\s*I\s*N\s*G\s*I\s*N/
|
|
80
|
|
81 syn match ickKeywordExp /<\s*-/
|
|
82
|
|
83 syn match ickVariable /[!.:]\s*\(\s\|\d\)*\d/ contains=ickUnaryVar
|
|
84 syn match ickArrayVar /[,;][0-9 ]*[0-9]/
|
|
85 syn match ickConstant /#[0-9 ]*[0-9]/
|
|
86 syn match ickUnaryVar /[&|?^]\|[2-5]\?@/ contained
|
|
87
|
|
88 syn match ickLabel /([0-9 ]*[0-9][9-9 ]*)/
|
|
89
|
|
90 hi link ickLabel Tag
|
|
91 hi link ickUnaryVar Normal
|
|
92 hi link ickVariable Identifier
|
|
93 hi link ickArrayVar Special
|
|
94 hi link ickConstant Constant
|
|
95 hi link ickIdentifier PreProc
|
|
96 hi link ickComment Comment
|
|
97
|
|
98 hi link ickKeywordGrn Type
|
|
99 hi link ickKeywordExp Operator
|
|
100 hi link ickKeyword Keyword
|
|
101
|
|
102 hi link ickKeywordAISGrn ickKeywordGrn
|
|
103 hi link ickKeywordAISExp ickKeywordExp
|
|
104 hi link ickKeywordAIS ickKeyword
|
|
105
|
|
106 hi link ickKeywordCLCGrn ickKeywordGrn
|
|
107 hi link ickKeywordCLCExp ickKeywordExp
|
|
108 hi link ickKeywordCLC ickKeyword
|
|
109
|
|
110 hi link ickKeywordESRGrn ickKeywordGrn
|
|
111 hi link ickKeywordESRExp ickKeywordExp
|
|
112 hi link ickKeywordESR ickKeyword
|
|
113
|
|
114 syn sync minlines=45
|
|
115
|
|
116 let b:current_syntax="intercal"
|