Mercurial > vim
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 |
rev | line source |
---|---|
7 | 1 " Vim syntax file |
2 " Language: PL/M | |
3 " Maintainer: Philippe Coulonges <cphil@cphil.net> | |
4 " Last change: 2003 May 11 | |
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 | 8 finish |
9 endif | |
10 | |
11 " PL/M is a case insensitive language | |
12 syn case ignore | |
13 | |
14 syn keyword plmTodo contained TODO FIXME XXX | |
15 | |
16 " String | |
17 syn region plmString start=+'+ end=+'+ | |
18 | |
19 syn match plmOperator "[@=\+\-\*\/\<\>]" | |
20 | |
21 syn match plmIdentifier "\<[a-zA-Z_][a-zA-Z0-9_]*\>" | |
22 | |
23 syn match plmDelimiter "[();,]" | |
24 | |
25 syn region plmPreProc start="^\s*\$\s*" skip="\\$" end="$" | |
26 | |
27 " FIXME : No Number support for floats, as I'm working on an embedded | |
28 " project that doesn't use any. | |
29 syn match plmNumber "-\=\<\d\+\>" | |
30 syn match plmNumber "\<[0-9a-fA-F]*[hH]*\>" | |
31 | |
32 " If you don't like tabs | |
33 "syn match plmShowTab "\t" | |
34 "syn match plmShowTabc "\t" | |
35 | |
36 "when wanted, highlight trailing white space | |
37 if exists("c_space_errors") | |
38 syn match plmSpaceError "\s*$" | |
39 syn match plmSpaceError " \+\t"me=e-1 | |
40 endif | |
41 | |
42 " | |
43 " Use the same control variable as C language for I believe | |
44 " users will want the same behavior | |
45 if exists("c_comment_strings") | |
46 " FIXME : don't work fine with c_comment_strings set, | |
47 " which I don't care as I don't use | |
48 | |
49 " A comment can contain plmString, plmCharacter and plmNumber. | |
50 " But a "*/" inside a plmString in a plmComment DOES end the comment! So we | |
51 " need to use a special type of plmString: plmCommentString, which also ends on | |
52 " "*/", and sees a "*" at the start of the line as comment again. | |
53 syntax match plmCommentSkip contained "^\s*\*\($\|\s\+\)" | |
54 syntax region plmCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=plmSpecial,plmCommentSkip | |
55 syntax region plmComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=plmSpecial | |
56 syntax region plmComment start="/\*" end="\*/" contains=plmTodo,plmCommentString,plmCharacter,plmNumber,plmFloat,plmSpaceError | |
57 syntax match plmComment "//.*" contains=plmTodo,plmComment2String,plmCharacter,plmNumber,plmSpaceError | |
58 else | |
59 syn region plmComment start="/\*" end="\*/" contains=plmTodo,plmSpaceError | |
60 syn match plmComment "//.*" contains=plmTodo,plmSpaceError | |
61 endif | |
62 | |
63 syntax match plmCommentError "\*/" | |
64 | |
65 syn keyword plmReserved ADDRESS AND AT BASED BY BYTE CALL CASE | |
66 syn keyword plmReserved DATA DECLARE DISABLE DO DWORD | |
67 syn keyword plmReserved ELSE ENABLE END EOF EXTERNAL | |
68 syn keyword plmReserved GO GOTO HALT IF INITIAL INTEGER INTERRUPT | |
69 syn keyword plmReserved LABEL LITERALLY MINUS MOD NOT OR | |
70 syn keyword plmReserved PLUS POINTER PROCEDURE PUBLIC | |
71 syn keyword plmReserved REAL REENTRANT RETURN SELECTOR STRUCTURE | |
72 syn keyword plmReserved THEN TO WHILE WORD XOR | |
73 syn keyword plm386Reserved CHARINT HWORD LONGINT OFFSET QWORD SHORTINT | |
74 | |
75 syn keyword plmBuiltIn ABS ADJUSTRPL BLOCKINPUT BLOCKINWORD BLOCKOUTPUT | |
76 syn keyword plmBuiltIn BLOCKOUTWORD BUILPTR CARRY CAUSEINTERRUPT CMPB | |
77 syn keyword plmBuiltIn CMPW DEC DOUBLE FINDB FINDRB FINDRW FINDW FIX | |
78 syn keyword plmBuiltIn FLAGS FLOAT GETREALERROR HIGH IABS INITREALMATHUNIT | |
79 syn keyword plmBuiltIn INPUT INT INWORD LAST LOCKSET LENGTH LOW MOVB MOVE | |
80 syn keyword plmBuiltIn MOVRB MOVRW MOVW NIL OUTPUT OUTWORD RESTOREREALSTATUS | |
81 syn keyword plmBuiltIn ROL ROR SAL SAVEREALSTATUS SCL SCR SELECTOROF SETB | |
82 syn keyword plmBuiltIn SETREALMODE SETW SHL SHR SIGN SIGNED SIZE SKIPB | |
83 syn keyword plmBuiltIn SKIPRB SKIPRW SKIPW STACKBASE STACKPTR TIME SIZE | |
84 syn keyword plmBuiltIn UNSIGN XLAT ZERO | |
85 syn keyword plm386BuiltIn INTERRUPT SETINTERRUPT | |
86 syn keyword plm286BuiltIn CLEARTASKSWITCHEDFLAG GETACCESSRIGHTS | |
87 syn keyword plm286BuiltIn GETSEGMENTLIMIT LOCALTABLE MACHINESTATUS | |
88 syn keyword plm286BuiltIn OFFSETOF PARITY RESTOREGLOBALTABLE | |
89 syn keyword plm286BuiltIn RESTOREINTERRUPTTABLE SAVEGLOBALTABLE | |
90 syn keyword plm286BuiltIn SAVEINTERRUPTTABLE SEGMENTREADABLE | |
91 syn keyword plm286BuiltIn SEGMENTWRITABLE TASKREGISTER WAITFORINTERRUPT | |
92 syn keyword plm386BuiltIn CONTROLREGISTER DEBUGREGISTER FINDHW | |
93 syn keyword plm386BuiltIn FINDRHW INHWORD MOVBIT MOVRBIT MOVHW MOVRHW | |
94 syn keyword plm386BuiltIn OUTHWORD SCANBIT SCANRBIT SETHW SHLD SHRD | |
95 syn keyword plm386BuiltIn SKIPHW SKIPRHW TESTREGISTER | |
96 syn keyword plm386w16BuiltIn BLOCKINDWORD BLOCKOUTDWORD CMPD FINDD | |
97 syn keyword plm386w16BuiltIn FINDRD INDWORD MOVD MOVRD OUTDWORD | |
98 syn keyword plm386w16BuiltIn SETD SKIPD SKIPRD | |
99 | |
100 syn sync lines=50 | |
101 | |
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 | 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 | 129 |
130 | |
131 let b:current_syntax = "plm" | |
132 | |
133 " vim: ts=8 sw=2 | |
134 |