annotate runtime/syntax/plm.vim @ 7890:a84db977663c

Added tag v7.4.1241 for changeset 8e84273089d03c18c5d19888d1c2d9cfa60632a5
author Christian Brabandt <cb@256bit.org>
date Tue, 02 Feb 2016 19:15: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: PL/M
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Philippe Coulonges <cphil@cphil.net>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
4 " Last change: 2003 May 11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 " PL/M is a case insensitive language
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 syn case ignore
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 syn keyword plmTodo contained TODO FIXME XXX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 syn region plmString start=+'+ end=+'+
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 syn match plmOperator "[@=\+\-\*\/\<\>]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 syn match plmIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 syn match plmDelimiter "[();,]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 syn region plmPreProc start="^\s*\$\s*" skip="\\$" end="$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30 " FIXME : No Number support for floats, as I'm working on an embedded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " project that doesn't use any.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 syn match plmNumber "-\=\<\d\+\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 syn match plmNumber "\<[0-9a-fA-F]*[hH]*\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 " If you don't like tabs
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 "syn match plmShowTab "\t"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 "syn match plmShowTabc "\t"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 "when wanted, highlight trailing white space
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 if exists("c_space_errors")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 syn match plmSpaceError "\s*$"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 syn match plmSpaceError " \+\t"me=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 "
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 " Use the same control variable as C language for I believe
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 " users will want the same behavior
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 if exists("c_comment_strings")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 " FIXME : don't work fine with c_comment_strings set,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 " which I don't care as I don't use
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 " A comment can contain plmString, plmCharacter and plmNumber.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 " But a "*/" inside a plmString in a plmComment DOES end the comment! So we
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
54 " need to use a special type of plmString: plmCommentString, which also ends on
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 " "*/", and sees a "*" at the start of the line as comment again.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syntax match plmCommentSkip contained "^\s*\*\($\|\s\+\)"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syntax region plmCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=plmSpecial,plmCommentSkip
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syntax region plmComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=plmSpecial
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syntax region plmComment start="/\*" end="\*/" contains=plmTodo,plmCommentString,plmCharacter,plmNumber,plmFloat,plmSpaceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
60 syntax match plmComment "//.*" contains=plmTodo,plmComment2String,plmCharacter,plmNumber,plmSpaceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 syn region plmComment start="/\*" end="\*/" contains=plmTodo,plmSpaceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
63 syn match plmComment "//.*" contains=plmTodo,plmSpaceError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
65
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
66 syntax match plmCommentError "\*/"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword plmReserved ADDRESS AND AT BASED BY BYTE CALL CASE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
69 syn keyword plmReserved DATA DECLARE DISABLE DO DWORD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn keyword plmReserved ELSE ENABLE END EOF EXTERNAL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword plmReserved GO GOTO HALT IF INITIAL INTEGER INTERRUPT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
72 syn keyword plmReserved LABEL LITERALLY MINUS MOD NOT OR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn keyword plmReserved PLUS POINTER PROCEDURE PUBLIC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword plmReserved REAL REENTRANT RETURN SELECTOR STRUCTURE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn keyword plmReserved THEN TO WHILE WORD XOR
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn keyword plm386Reserved CHARINT HWORD LONGINT OFFSET QWORD SHORTINT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
78 syn keyword plmBuiltIn ABS ADJUSTRPL BLOCKINPUT BLOCKINWORD BLOCKOUTPUT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn keyword plmBuiltIn BLOCKOUTWORD BUILPTR CARRY CAUSEINTERRUPT CMPB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn keyword plmBuiltIn CMPW DEC DOUBLE FINDB FINDRB FINDRW FINDW FIX
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword plmBuiltIn FLAGS FLOAT GETREALERROR HIGH IABS INITREALMATHUNIT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword plmBuiltIn INPUT INT INWORD LAST LOCKSET LENGTH LOW MOVB MOVE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
83 syn keyword plmBuiltIn MOVRB MOVRW MOVW NIL OUTPUT OUTWORD RESTOREREALSTATUS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn keyword plmBuiltIn ROL ROR SAL SAVEREALSTATUS SCL SCR SELECTOROF SETB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn keyword plmBuiltIn SETREALMODE SETW SHL SHR SIGN SIGNED SIZE SKIPB
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn keyword plmBuiltIn SKIPRB SKIPRW SKIPW STACKBASE STACKPTR TIME SIZE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87 syn keyword plmBuiltIn UNSIGN XLAT ZERO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
88 syn keyword plm386BuiltIn INTERRUPT SETINTERRUPT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn keyword plm286BuiltIn CLEARTASKSWITCHEDFLAG GETACCESSRIGHTS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90 syn keyword plm286BuiltIn GETSEGMENTLIMIT LOCALTABLE MACHINESTATUS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
91 syn keyword plm286BuiltIn OFFSETOF PARITY RESTOREGLOBALTABLE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
92 syn keyword plm286BuiltIn RESTOREINTERRUPTTABLE SAVEGLOBALTABLE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
93 syn keyword plm286BuiltIn SAVEINTERRUPTTABLE SEGMENTREADABLE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
94 syn keyword plm286BuiltIn SEGMENTWRITABLE TASKREGISTER WAITFORINTERRUPT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
95 syn keyword plm386BuiltIn CONTROLREGISTER DEBUGREGISTER FINDHW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
96 syn keyword plm386BuiltIn FINDRHW INHWORD MOVBIT MOVRBIT MOVHW MOVRHW
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
97 syn keyword plm386BuiltIn OUTHWORD SCANBIT SCANRBIT SETHW SHLD SHRD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
98 syn keyword plm386BuiltIn SKIPHW SKIPRHW TESTREGISTER
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99 syn keyword plm386w16BuiltIn BLOCKINDWORD BLOCKOUTDWORD CMPD FINDD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 syn keyword plm386w16BuiltIn FINDRD INDWORD MOVD MOVRD OUTDWORD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 syn keyword plm386w16BuiltIn SETD SKIPD SKIPRD
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
103 syn sync lines=50
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
104
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
105 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
106 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
107 " 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
108 if version >= 508 || !exists("did_plm_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 let did_plm_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
115
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
116 " The default methods for highlighting. Can be overridden later
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 " HiLink plmLabel Label
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 " HiLink plmConditional Conditional
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 " HiLink plmRepeat Repeat
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 HiLink plmTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121 HiLink plmNumber Number
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 HiLink plmOperator Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123 HiLink plmDelimiter Operator
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124 "HiLink plmShowTab Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
125 "HiLink plmShowTabc Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
126 HiLink plmIdentifier Identifier
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
127 HiLink plmBuiltIn Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
128 HiLink plm286BuiltIn Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
129 HiLink plm386BuiltIn Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
130 HiLink plm386w16BuiltIn Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131 HiLink plmReserved Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
132 HiLink plm386Reserved Statement
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133 HiLink plmPreProc PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
134 HiLink plmCommentError plmError
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135 HiLink plmCommentString plmString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
136 HiLink plmComment2String plmString
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
137 HiLink plmCommentSkip plmComment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 HiLink plmString String
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 HiLink plmComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
144 let b:current_syntax = "plm"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
145
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146 " vim: ts=8 sw=2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147