annotate runtime/syntax/plm.vim @ 17589:5c29f5419166

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