Mercurial > vim
comparison runtime/syntax/simula.vim @ 7:3fc0f57ecb91 v7.0001
updated for version 7.0001
author | vimboss |
---|---|
date | Sun, 13 Jun 2004 20:20:40 +0000 |
parents | |
children | 43efa4f5a8ea |
comparison
equal
deleted
inserted
replaced
6:c2daee826b8f | 7:3fc0f57ecb91 |
---|---|
1 " Vim syntax file | |
2 " Language: Simula | |
3 " Maintainer: Haakon Riiser <hakonrk@fys.uio.no> | |
4 " URL: http://folk.uio.no/hakonrk/vim/syntax/simula.vim | |
5 " Last Change: 2001 May 15 | |
6 | |
7 " For version 5.x: Clear all syntax items | |
8 " For version 6.x: Quit when a syntax file was already loaded | |
9 if version < 600 | |
10 syn clear | |
11 elseif exists("b:current_syntax") | |
12 finish | |
13 endif | |
14 | |
15 " No case sensitivity in Simula | |
16 syn case ignore | |
17 | |
18 syn match simulaComment "^%.*$" contains=simulaTodo | |
19 syn region simulaComment start="!\|\<comment\>" end=";" contains=simulaTodo | |
20 | |
21 " Text between the keyword 'end' and either a semicolon or one of the | |
22 " keywords 'end', 'else', 'when' or 'otherwise' is also a comment | |
23 syn region simulaComment start="\<end\>"lc=3 matchgroup=Statement end=";\|\<\(end\|else\|when\|otherwise\)\>" | |
24 | |
25 syn match simulaCharError "'.\{-2,}'" | |
26 syn match simulaCharacter "'.'" | |
27 syn match simulaCharacter "'!\d\{-}!'" contains=simulaSpecialChar | |
28 syn match simulaString '".\{-}"' contains=simulaSpecialChar,simulaTodo | |
29 | |
30 syn keyword simulaBoolean true false | |
31 syn keyword simulaCompound begin end | |
32 syn keyword simulaConditional else if otherwise then until when | |
33 syn keyword simulaConstant none notext | |
34 syn keyword simulaFunction procedure | |
35 syn keyword simulaOperator eq eqv ge gt imp in is le lt ne new not qua | |
36 syn keyword simulaRepeat while for | |
37 syn keyword simulaReserved activate after at before delay go goto label prior reactivate switch to | |
38 syn keyword simulaStatement do inner inspect step this | |
39 syn keyword simulaStorageClass external hidden name protected value | |
40 syn keyword simulaStructure class | |
41 syn keyword simulaType array boolean character integer long real short text virtual | |
42 syn match simulaAssigned "\<\h\w*\s*\((.*)\)\=\s*:\(=\|-\)"me=e-2 | |
43 syn match simulaOperator "[&:=<>+\-*/]" | |
44 syn match simulaOperator "\<and\(\s\+then\)\=\>" | |
45 syn match simulaOperator "\<or\(\s\+else\)\=\>" | |
46 syn match simulaReferenceType "\<ref\s*(.\{-})" | |
47 syn match simulaSemicolon ";" | |
48 syn match simulaSpecial "[(),.]" | |
49 syn match simulaSpecialCharErr "!\d\{-4,}!" contained | |
50 syn match simulaSpecialCharErr "!!" contained | |
51 syn match simulaSpecialChar "!\d\{-}!" contains=simulaSpecialCharErr contained | |
52 syn match simulaTodo "xxx\+" contained | |
53 | |
54 " Integer number (or float without `.') | |
55 syn match simulaNumber "-\=\<\d\+\>" | |
56 " Real with optional exponent | |
57 syn match simulaReal "-\=\<\d\+\(\.\d\+\)\=\(&&\=[+-]\=\d\+\)\=\>" | |
58 " Real starting with a `.', optional exponent | |
59 syn match simulaReal "-\=\.\d\+\(&&\=[+-]\=\d\+\)\=\>" | |
60 | |
61 if version >= 508 || !exists("did_simula_syntax_inits") | |
62 if version < 508 | |
63 let did_simula_syntax_inits = 1 | |
64 command -nargs=+ HiLink hi link <args> | |
65 else | |
66 command -nargs=+ HiLink hi def link <args> | |
67 endif | |
68 | |
69 HiLink simulaAssigned Identifier | |
70 HiLink simulaBoolean Boolean | |
71 HiLink simulaCharacter Character | |
72 HiLink simulaCharError Error | |
73 HiLink simulaComment Comment | |
74 HiLink simulaCompound Statement | |
75 HiLink simulaConditional Conditional | |
76 HiLink simulaConstant Constant | |
77 HiLink simulaFunction Function | |
78 HiLink simulaNumber Number | |
79 HiLink simulaOperator Operator | |
80 HiLink simulaReal Float | |
81 HiLink simulaReferenceType Type | |
82 HiLink simulaRepeat Repeat | |
83 HiLink simulaReserved Error | |
84 HiLink simulaSemicolon Statement | |
85 HiLink simulaSpecial Special | |
86 HiLink simulaSpecialChar SpecialChar | |
87 HiLink simulaSpecialCharErr Error | |
88 HiLink simulaStatement Statement | |
89 HiLink simulaStorageClass StorageClass | |
90 HiLink simulaString String | |
91 HiLink simulaStructure Structure | |
92 HiLink simulaTodo Todo | |
93 HiLink simulaType Type | |
94 | |
95 delcommand HiLink | |
96 endif | |
97 | |
98 let b:current_syntax = "simula" | |
99 " vim: sts=4 sw=4 ts=8 |