Mercurial > vim
annotate runtime/syntax/clipper.vim @ 15777:8ee4000692f3
Added tag v8.1.0895 for changeset 7f91de3f5e35d0c62f3f9d9a633e232c21f7e582
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 10 Feb 2019 23:30:09 +0100 |
parents | 46763b01cd9a |
children |
rev | line source |
---|---|
7 | 1 " Vim syntax file: |
2 " Language: Clipper 5.2 & FlagShip | |
3 " Maintainer: C R Zamana <zamana@zip.net> | |
4 " Some things based on c.vim by Bram Moolenaar and pascal.vim by Mario Eusebio | |
3237 | 5 " Last Change: 2011 Dec 29 by Thilo Six |
7 | 6 |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
7 " quit when a syntax file was already loaded |
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
8 if exists("b:current_syntax") |
7 | 9 finish |
10 endif | |
11 | |
3237 | 12 let s:cpo_save = &cpo |
13 set cpo&vim | |
14 | |
7 | 15 " Exceptions for my "Very Own" (TM) user variables naming style. |
16 " If you don't like this, comment it | |
17 syn match clipperUserVariable "\<[a,b,c,d,l,n,o,u,x][A-Z][A-Za-z0-9_]*\>" | |
18 syn match clipperUserVariable "\<[a-z]\>" | |
19 | |
20 " Clipper is case insensitive ( see "exception" above ) | |
21 syn case ignore | |
22 | |
23 " Clipper keywords ( in no particular order ) | |
24 syn keyword clipperStatement ACCEPT APPEND BLANK FROM AVERAGE CALL CANCEL | |
25 syn keyword clipperStatement CLEAR ALL GETS MEMORY TYPEAHEAD CLOSE | |
26 syn keyword clipperStatement COMMIT CONTINUE SHARED NEW PICT | |
27 syn keyword clipperStatement COPY FILE STRUCTURE STRU EXTE TO COUNT | |
28 syn keyword clipperStatement CREATE FROM NIL | |
29 syn keyword clipperStatement DELETE FILE DIR DISPLAY EJECT ERASE FIND GO | |
30 syn keyword clipperStatement INDEX INPUT VALID WHEN | |
31 syn keyword clipperStatement JOIN KEYBOARD LABEL FORM LIST LOCATE MENU TO | |
32 syn keyword clipperStatement NOTE PACK QUIT READ | |
33 syn keyword clipperStatement RECALL REINDEX RELEASE RENAME REPLACE REPORT | |
34 syn keyword clipperStatement RETURN FORM RESTORE | |
35 syn keyword clipperStatement RUN SAVE SEEK SELECT | |
36 syn keyword clipperStatement SKIP SORT STORE SUM TEXT TOTAL TYPE UNLOCK | |
37 syn keyword clipperStatement UPDATE USE WAIT ZAP | |
38 syn keyword clipperStatement BEGIN SEQUENCE | |
39 syn keyword clipperStatement SET ALTERNATE BELL CENTURY COLOR CONFIRM CONSOLE | |
40 syn keyword clipperStatement CURSOR DATE DECIMALS DEFAULT DELETED DELIMITERS | |
41 syn keyword clipperStatement DEVICE EPOCH ESCAPE EXACT EXCLUSIVE FILTER FIXED | |
42 syn keyword clipperStatement FORMAT FUNCTION INTENSITY KEY MARGIN MESSAGE | |
43 syn keyword clipperStatement ORDER PATH PRINTER PROCEDURE RELATION SCOREBOARD | |
44 syn keyword clipperStatement SOFTSEEK TYPEAHEAD UNIQUE WRAP | |
45 syn keyword clipperStatement BOX CLEAR GET PROMPT SAY ? ?? | |
46 syn keyword clipperStatement DELETE TAG GO RTLINKCMD TMP DBLOCKINFO | |
47 syn keyword clipperStatement DBEVALINFO DBFIELDINFO DBFILTERINFO DBFUNCTABLE | |
48 syn keyword clipperStatement DBOPENINFO DBORDERCONDINFO DBORDERCREATEINF | |
49 syn keyword clipperStatement DBORDERINFO DBRELINFO DBSCOPEINFO DBSORTINFO | |
50 syn keyword clipperStatement DBSORTITEM DBTRANSINFO DBTRANSITEM WORKAREA | |
51 | |
52 " Conditionals | |
53 syn keyword clipperConditional CASE OTHERWISE ENDCASE | |
54 syn keyword clipperConditional IF ELSE ENDIF IIF IFDEF IFNDEF | |
55 | |
56 " Loops | |
57 syn keyword clipperRepeat DO WHILE ENDDO | |
58 syn keyword clipperRepeat FOR TO NEXT STEP | |
59 | |
60 " Visibility | |
61 syn keyword clipperStorageClass ANNOUNCE STATIC | |
62 syn keyword clipperStorageClass DECLARE EXTERNAL LOCAL MEMVAR PARAMETERS | |
63 syn keyword clipperStorageClass PRIVATE PROCEDURE PUBLIC REQUEST STATIC | |
64 syn keyword clipperStorageClass FIELD FUNCTION | |
65 syn keyword clipperStorageClass EXIT PROCEDURE INIT PROCEDURE | |
66 | |
67 " Operators | |
68 syn match clipperOperator "$\|%\|&\|+\|-\|->\|!" | |
69 syn match clipperOperator "\.AND\.\|\.NOT\.\|\.OR\." | |
70 syn match clipperOperator ":=\|<\|<=\|<>\|!=\|#\|=\|==\|>\|>=\|@" | |
71 syn match clipperOperator "*" | |
72 | |
73 " Numbers | |
74 syn match clipperNumber "\<\d\+\(u\=l\=\|lu\|f\)\>" | |
75 | |
76 " Includes | |
77 syn region clipperIncluded contained start=+"+ skip=+\\\\\|\\"+ end=+"+ | |
78 syn match clipperIncluded contained "<[^>]*>" | |
79 syn match clipperInclude "^\s*#\s*include\>\s*["<]" contains=clipperIncluded | |
80 | |
81 " String and Character constants | |
82 syn region clipperString start=+"+ end=+"+ | |
83 syn region clipperString start=+'+ end=+'+ | |
84 | |
85 " Delimiters | |
86 syn match ClipperDelimiters "[()]\|[\[\]]\|[{}]\|[||]" | |
87 | |
88 " Special | |
89 syn match clipperLineContinuation ";" | |
90 | |
91 " This is from Bram Moolenaar: | |
92 if exists("c_comment_strings") | |
93 " A comment can contain cString, cCharacter and cNumber. | |
94 " But a "*/" inside a cString in a clipperComment DOES end the comment! | |
95 " So we need to use a special type of cString: clipperCommentString, which | |
96 " also ends on "*/", and sees a "*" at the start of the line as comment | |
97 " again. Unfortunately this doesn't very well work for // type of comments :-( | |
98 syntax match clipperCommentSkip contained "^\s*\*\($\|\s\+\)" | |
99 syntax region clipperCommentString contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=clipperCommentSkip | |
100 syntax region clipperComment2String contained start=+"+ skip=+\\\\\|\\"+ end=+"+ end="$" | |
101 syntax region clipperComment start="/\*" end="\*/" contains=clipperCommentString,clipperCharacter,clipperNumber,clipperString | |
102 syntax match clipperComment "//.*" contains=clipperComment2String,clipperCharacter,clipperNumber | |
103 else | |
104 syn region clipperComment start="/\*" end="\*/" | |
105 syn match clipperComment "//.*" | |
106 endif | |
107 syntax match clipperCommentError "\*/" | |
108 | |
109 " Lines beggining with an "*" are comments too | |
110 syntax match clipperComment "^\*.*" | |
111 | |
112 | |
113 " Define the default highlighting. | |
10048
43efa4f5a8ea
commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5
Christian Brabandt <cb@256bit.org>
parents:
3237
diff
changeset
|
114 " Only when an item doesn't have highlighting yet |
7 | 115 |
10051
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
116 hi def link clipperConditional Conditional |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
117 hi def link clipperRepeat Repeat |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
118 hi def link clipperNumber Number |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
119 hi def link clipperInclude Include |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
120 hi def link clipperComment Comment |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
121 hi def link clipperOperator Operator |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
122 hi def link clipperStorageClass StorageClass |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
123 hi def link clipperStatement Statement |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
124 hi def link clipperString String |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
125 hi def link clipperFunction Function |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
126 hi def link clipperLineContinuation Special |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
127 hi def link clipperDelimiters Delimiter |
46763b01cd9a
commit https://github.com/vim/vim/commit/f37506f60f87d52a9e8850e30067645e2b13783c
Christian Brabandt <cb@256bit.org>
parents:
10048
diff
changeset
|
128 hi def link clipperUserVariable Identifier |
7 | 129 |
130 | |
131 let b:current_syntax = "clipper" | |
132 | |
3237 | 133 let &cpo = s:cpo_save |
134 unlet s:cpo_save | |
135 " vim: ts=8 |