annotate runtime/syntax/simula.vim @ 7283:631cd8059bf4 v7.4.947

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