annotate runtime/syntax/modsim3.vim @ 9287:af25a1a875db v7.4.1926

commit https://github.com/vim/vim/commit/a890f5e34887bff7616bdb4b9ee0bf98c8d2a8f0 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jun 12 23:03:19 2016 +0200 patch 7.4.1926 Problem: Possible crash with many history items. Solution: Avoid the index going past the last item.
author Christian Brabandt <cb@256bit.org>
date Sun, 12 Jun 2016 23:15:07 +0200
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: Modsim III, by compuware corporation (www.compuware.com)
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Philipp Jocham <flip@sbox.tu-graz.ac.at>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Extension: *.mod
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " Last Change: 2001 May 10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " 2001 March 24:
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 " - Modsim III is a registered trademark from compuware corporation
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " - made compatible with Vim 6.0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " 1999 Apr 22 : Changed modsim3Literal from region to match
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 " very basic things only (based on the modula2 and c files).
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " Remove any old syntax stuff hanging around
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " syn case match " case sensitiv match is default
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25 " A bunch of keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn keyword modsim3Keyword ACTID ALL AND AS ASK
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 syn keyword modsim3Keyword BY CALL CASE CLASS CONST DIV
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn keyword modsim3Keyword DOWNTO DURATION ELSE ELSIF EXIT FALSE FIXED FOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 syn keyword modsim3Keyword FOREACH FORWARD IF IN INHERITED INOUT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 syn keyword modsim3Keyword INTERRUPT LOOP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 syn keyword modsim3Keyword MOD MONITOR NEWVALUE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn keyword modsim3Keyword NONMODSIM NOT OBJECT OF ON OR ORIGINAL OTHERWISE OUT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn keyword modsim3Keyword OVERRIDE PRIVATE PROTO REPEAT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 syn keyword modsim3Keyword RETURN REVERSED SELF STRERR TELL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 syn keyword modsim3Keyword TERMINATE THISMETHOD TO TRUE TYPE UNTIL VALUE VAR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 syn keyword modsim3Keyword WAIT WAITFOR WHEN WHILE WITH
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38 " Builtin functions and procedures
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 syn keyword modsim3Builtin ABS ACTIVATE ADDMONITOR CAP CHARTOSTR CHR CLONE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 syn keyword modsim3Builtin DEACTIVATE DEC DISPOSE FLOAT GETMONITOR HIGH INC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn keyword modsim3Builtin INPUT INSERT INTTOSTR ISANCESTOR LOW LOWER MAX MAXOF
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn keyword modsim3Builtin MIN MINOF NEW OBJTYPEID OBJTYPENAME OBJVARID ODD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 syn keyword modsim3Builtin ONERROR ONEXIT ORD OUTPUT POSITION PRINT REALTOSTR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 syn keyword modsim3Builtin REPLACE REMOVEMONITOR ROUND SCHAR SIZEOF SPRINT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 syn keyword modsim3Builtin STRLEN STRTOCHAR STRTOINT STRTOREAL SUBSTR TRUNC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 syn keyword modsim3Builtin UPDATEVALUE UPPER VAL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword modsim3BuiltinNoParen HALT TRACE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " Special keywords
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword modsim3Block PROCEDURE METHOD MODULE MAIN DEFINITION IMPLEMENTATION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword modsim3Block BEGIN END
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 syn keyword modsim3Include IMPORT FROM
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword modsim3Type ANYARRAY ANYOBJ ANYREC ARRAY BOOLEAN CHAR INTEGER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword modsim3Type LMONITORED LRMONITORED NILARRAY NILOBJ NILREC REAL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword modsim3Type RECORD RMONITOR RMONITORED STRING
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 " catch errros cause by wrong parenthesis
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 " slight problem with "( *)" or "(* )". Hints?
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn region modsim3Paren transparent start='(' end=')' contains=ALLBUT,modsim3ParenError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match modsim3ParenError ")"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65 " Comments
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syn region modsim3Comment1 start="{" end="}" contains=modsim3Comment1,modsim3Comment2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn region modsim3Comment2 start="(\*" end="\*)" contains=modsim3Comment1,modsim3Comment2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 " highlighting is wrong for constructs like "{ (* } *)",
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 " which are allowed in Modsim III, but
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 " I think something like that shouldn't be used anyway.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 " Strings
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn region modsim3String start=+"+ end=+"+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 " Literals
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 "syn region modsim3Literal start=+'+ end=+'+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn match modsim3Literal "'[^']'\|''''"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 " For version 5.8 and later: only when an item doesn't have highlighting yet
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 if version >= 508 || !exists("did_modsim3_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 let did_modsim3_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 " The default methods for highlighting. Can be overridden later
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 HiLink modsim3Keyword Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 HiLink modsim3Block Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 HiLink modsim3Comment1 Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 HiLink modsim3Comment2 Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 HiLink modsim3String String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 HiLink modsim3Literal Character
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 HiLink modsim3Include Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 HiLink modsim3Type Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 HiLink modsim3ParenError Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 HiLink modsim3Builtin Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 HiLink modsim3BuiltinNoParen Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 let b:current_syntax = "modsim3"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
108 " vim: ts=8 sw=2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109