annotate runtime/syntax/clipper.vim @ 8218:3456e2ebebd4 v7.4.1402

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