annotate runtime/syntax/cobol.vim @ 9394:bea9958b35a9

Added tag v7.4.1978 for changeset c4aae9421aecc06c8cc51edfc26ef083a84e690b
author Christian Brabandt <cb@256bit.org>
date Fri, 01 Jul 2016 22:00:07 +0200
parents 3af822eb4da5
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
6647
3af822eb4da5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
2 " Language: COBOL
3af822eb4da5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
3 " Maintainer: Tim Pope <vimNOSPAM@tpope.org>
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
4 " (formerly Davyd Ondrejko <vondraco@columbus.rr.com>)
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " (formerly Sitaram Chamarty <sitaram@diac.com> and
6647
3af822eb4da5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
6 " James Mitchell <james_mitchell@acm.org>)
3af822eb4da5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
7 " Last Change: 2015 Feb 13
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 " For version 5.x: Clear all syntax items
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 " For version 6.x: Quit when a syntax file was already loaded
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 syntax clear
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 elseif exists("b:current_syntax")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 " MOST important - else most of the keywords wont work!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18 if version < 600
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 set isk=@,48-57,-
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 setlocal isk=@,48-57,-
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23
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
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
26 syn cluster cobolStart contains=cobolAreaA,cobolAreaB,cobolComment,cobolCompiler
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
27 syn cluster cobolAreaA contains=cobolParagraph,cobolSection,cobolDivision
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
28 "syn cluster cobolAreaB contains=
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
29 syn cluster cobolAreaAB contains=cobolLine
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
30 syn cluster cobolLine contains=cobolReserved
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
31 syn match cobolMarker "^\%( \{,5\}[^ ]\)\@=.\{,6}" nextgroup=@cobolStart
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
32 syn match cobolSpace "^ \{6\}" nextgroup=@cobolStart
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
33 syn match cobolAreaA " \{1,4\}" contained nextgroup=@cobolAreaA,@cobolAreaAB
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
34 syn match cobolAreaB " \{5,\}\|- *" contained nextgroup=@cobolAreaB,@cobolAreaAB
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
35 syn match cobolComment "[/*C].*$" contained
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
36 syn match cobolCompiler "$.*$" contained
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
37 syn match cobolLine ".*$" contained contains=cobolReserved,@cobolLine
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
38
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
39 syn match cobolDivision "[A-Z][A-Z0-9-]*[A-Z0-9]\s\+DIVISION\."he=e-1 contained contains=cobolDivisionName
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
40 syn keyword cobolDivisionName contained IDENTIFICATION ENVIRONMENT DATA PROCEDURE
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
41 syn match cobolSection "[A-Z][A-Z0-9-]*[A-Z0-9]\s\+SECTION\."he=e-1 contained contains=cobolSectionName
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
42 syn keyword cobolSectionName contained CONFIGURATION INPUT-OUTPUT FILE WORKING-STORAGE LOCAL-STORAGE LINKAGE
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
43 syn match cobolParagraph "\a[A-Z0-9-]*[A-Z0-9]\.\|\d[A-Z0-9-]*[A-Z]\."he=e-1 contained contains=cobolParagraphName
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
44 syn keyword cobolParagraphName contained PROGRAM-ID SOURCE-COMPUTER OBJECT-COMPUTER SPECIAL-NAMES FILE-CONTROL I-O-CONTROL
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
45
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
46
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
47 "syn match cobolKeys "^\a\{1,6\}" contains=cobolReserved
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 syn keyword cobolReserved contained ACCEPT ACCESS ADD ADDRESS ADVANCING AFTER ALPHABET ALPHABETIC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 syn keyword cobolReserved contained ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED ALS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 syn keyword cobolReserved contained ALTERNATE AND ANY ARE AREA AREAS ASCENDING ASSIGN AT AUTHOR BEFORE BINARY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 syn keyword cobolReserved contained BLANK BLOCK BOTTOM BY CANCEL CBLL CD CF CH CHARACTER CHARACTERS CLASS
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
52 syn keyword cobolReserved contained CLOCK-UNITS CLOSE COBOL CODE CODE-SET COLLATING COLUMN COMMA COMMON
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
53 syn keyword cobolReserved contained COMMUNICATIONS COMPUTATIONAL COMPUTE CONTENT CONTINUE
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
54 syn keyword cobolReserved contained CONTROL CONVERTING CORR CORRESPONDING COUNT CURRENCY DATE DATE-COMPILED
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 syn keyword cobolReserved contained DATE-WRITTEN DAY DAY-OF-WEEK DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
56 syn keyword cobolReserved contained DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING DECIMAL-POINT
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
57 syn keyword cobolReserved contained DELARATIVES DELETE DELIMITED DELIMITER DEPENDING DESCENDING DESTINATION
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
58 syn keyword cobolReserved contained DETAIL DISABLE DISPLAY DIVIDE DIVISION DOWN DUPLICATES DYNAMIC EGI ELSE EMI
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
59 syn keyword cobolReserved contained ENABLE END-ADD END-COMPUTE END-DELETE END-DIVIDE END-EVALUATE END-IF
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
60 syn keyword cobolReserved contained END-MULTIPLY END-OF-PAGE END-READ END-RECEIVE END-RETURN
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
61 syn keyword cobolReserved contained END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT END-UNSTRING
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
62 syn keyword cobolReserved contained END-WRITE EQUAL ERROR ESI EVALUATE EVERY EXCEPTION EXIT
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
63 syn keyword cobolReserved contained EXTEND EXTERNAL FALSE FD FILLER FINAL FIRST FOOTING FOR FROM
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
64 syn keyword cobolReserved contained GENERATE GIVING GLOBAL GREATER GROUP HEADING HIGH-VALUE HIGH-VALUES I-O
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
65 syn keyword cobolReserved contained IN INDEX INDEXED INDICATE INITIAL INITIALIZE
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
66 syn keyword cobolReserved contained INITIATE INPUT INSPECT INSTALLATION INTO IS JUST
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
67 syn keyword cobolReserved contained JUSTIFIED KEY LABEL LAST LEADING LEFT LENGTH LOCK MEMORY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
68 syn keyword cobolReserved contained MERGE MESSAGE MODE MODULES MOVE MULTIPLE MULTIPLY NATIVE NEGATIVE NEXT NO NOT
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
69 syn keyword cobolReserved contained NUMBER NUMERIC NUMERIC-EDITED OCCURS OF OFF OMITTED ON OPEN
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
70 syn keyword cobolReserved contained OPTIONAL OR ORDER ORGANIZATION OTHER OUTPUT OVERFLOW PACKED-DECIMAL PADDING
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
71 syn keyword cobolReserved contained PAGE PAGE-COUNTER PERFORM PF PH PIC PICTURE PLUS POINTER POSITION POSITIVE
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
72 syn keyword cobolReserved contained PRINTING PROCEDURES PROCEDD PROGRAM PURGE QUEUE QUOTES
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
73 syn keyword cobolReserved contained RANDOM RD READ RECEIVE RECORD RECORDS REDEFINES REEL REFERENCE REFERENCES
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
74 syn keyword cobolReserved contained RELATIVE RELEASE REMAINDER REMOVAL REPLACE REPLACING REPORT REPORTING
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
75 syn keyword cobolReserved contained REPORTS RERUN RESERVE RESET RETURN RETURNING REVERSED REWIND REWRITE RF RH
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
76 syn keyword cobolReserved contained RIGHT ROUNDED RUN SAME SD SEARCH SECTION SECURITY SEGMENT SEGMENT-LIMITED
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
77 syn keyword cobolReserved contained SELECT SEND SENTENCE SEPARATE SEQUENCE SEQUENTIAL SET SIGN SIZE SORT
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
78 syn keyword cobolReserved contained SORT-MERGE SOURCE STANDARD
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
79 syn keyword cobolReserved contained STANDARD-1 STANDARD-2 START STATUS STOP STRING SUB-QUEUE-1 SUB-QUEUE-2
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
80 syn keyword cobolReserved contained SUB-QUEUE-3 SUBTRACT SUM SUPPRESS SYMBOLIC SYNC SYNCHRONIZED TABLE TALLYING
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
81 syn keyword cobolReserved contained TAPE TERMINAL TERMINATE TEST TEXT THAN THEN THROUGH THRU TIME TIMES TO TOP
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
82 syn keyword cobolReserved contained TRAILING TRUE TYPE UNIT UNSTRING UNTIL UP UPON USAGE USE USING VALUE VALUES
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
83 syn keyword cobolReserved contained VARYING WHEN WITH WORDS WRITE
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
84 syn match cobolReserved contained "\<CONTAINS\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
85 syn match cobolReserved contained "\<\(IF\|INVALID\|END\|EOP\)\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
86 syn match cobolReserved contained "\<ALL\>"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
87
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
88 syn cluster cobolLine add=cobolConstant,cobolNumber,cobolPic
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
89 syn keyword cobolConstant SPACE SPACES NULL ZERO ZEROES ZEROS LOW-VALUE LOW-VALUES
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
90
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
91 syn match cobolNumber "\<-\=\d*\.\=\d\+\>" contained
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
92 syn match cobolPic "\<S*9\+\>" contained
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
93 syn match cobolPic "\<$*\.\=9\+\>" contained
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
94 syn match cobolPic "\<Z*\.\=9\+\>" contained
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
95 syn match cobolPic "\<V9\+\>" contained
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
96 syn match cobolPic "\<9\+V\>" contained
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
97 syn match cobolPic "\<-\+[Z9]\+\>" contained
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
98 syn match cobolTodo "todo" contained containedin=cobolComment
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
99
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
100 " For MicroFocus or other inline comments, include this line.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
101 " syn region cobolComment start="*>" end="$" contains=cobolTodo,cobolMarker
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
102
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
103 syn match cobolBadLine "[^ D\*$/-].*" contained
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
104 " If comment mark somehow gets into column past Column 7.
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
105 syn match cobolBadLine "\s\+\*.*" contained
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
106 syn cluster cobolStart add=cobolBadLine
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
107
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
108
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
109 syn keyword cobolGoTo GO GOTO
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
110 syn keyword cobolCopy COPY
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
111
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
112 " cobolBAD: things that are BAD NEWS!
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
113 syn keyword cobolBAD ALTER ENTER RENAMES
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
114
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
115 syn cluster cobolLine add=cobolGoTo,cobolCopy,cobolBAD,cobolWatch,cobolEXECs
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
116
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
117 " cobolWatch: things that are important when trying to understand a program
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
118 syn keyword cobolWatch OCCURS DEPENDING VARYING BINARY COMP REDEFINES
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
119 syn keyword cobolWatch REPLACING RUN
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
120 syn match cobolWatch "COMP-[123456XN]"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
121
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
122 syn keyword cobolEXECs EXEC END-EXEC
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
123
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
124
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
125 syn cluster cobolAreaA add=cobolDeclA
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
126 syn cluster cobolAreaAB add=cobolDecl
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
127 syn match cobolDeclA "\(0\=1\|77\|78\) " contained nextgroup=cobolLine
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
128 syn match cobolDecl "[1-4]\d " contained nextgroup=cobolLine
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
129 syn match cobolDecl "0\=[2-9] " contained nextgroup=cobolLine
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
130 syn match cobolDecl "66 " contained nextgroup=cobolLine
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
131
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
132 syn match cobolWatch "88 " contained nextgroup=cobolLine
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
133
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
134 "syn match cobolBadID "\k\+-\($\|[^-A-Z0-9]\)" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
135
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
136 syn cluster cobolLine add=cobolCALLs,cobolString,cobolCondFlow
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
137 syn keyword cobolCALLs CALL END-CALL CANCEL GOBACK PERFORM END-PERFORM INVOKE
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
138 syn match cobolCALLs "EXIT \+PROGRAM"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
139 syn match cobolExtras /\<VALUE \+\d\+\./hs=s+6,he=e-1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
140
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
141 syn match cobolString /"[^"]*\("\|$\)/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
142 syn match cobolString /'[^']*\('\|$\)/
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
143
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
144 "syn region cobolLine start="^.\{6}[ D-]" end="$" contains=ALL
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
145 syn match cobolIndicator "\%7c[D-]" contained
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
146
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
147 if exists("cobol_legacy_code")
6647
3af822eb4da5 Updated runtime files.
Bram Moolenaar <bram@vim.org>
parents: 2034
diff changeset
148 syn region cobolCondFlow contains=ALLBUT,cobolLine,cobolBadLine start="\<\(IF\|INVALID\|END\|EOP\)\>" skip=/\('\|"\)[^"]\{-}\("\|'\|$\)/ end="\." keepend
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
149 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
150
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
151 " many legacy sources have junk in columns 1-6: must be before others
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
152 " Stuff after column 72 is in error - must be after all other "match" entries
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
153 if exists("cobol_legacy_code")
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
154 syn match cobolBadLine "\%73c.*" containedin=ALLBUT,cobolComment
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
155 else
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
156 syn match cobolBadLine "\%73c.*" containedin=ALL
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
157 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
158
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
159 " Define the default highlighting.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
160 " For version 5.7 and earlier: only when not done already
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
161 " 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
162 if version >= 508 || !exists("did_cobol_syntax_inits")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
163 if version < 508
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
164 let did_cobol_syntax_inits = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
165 command -nargs=+ HiLink hi link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
166 else
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
167 command -nargs=+ HiLink hi def link <args>
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
168 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
169
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
170 HiLink cobolBAD Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
171 HiLink cobolBadID Error
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
172 HiLink cobolBadLine Error
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
173 if exists("g:cobol_legacy_code")
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
174 HiLink cobolMarker Comment
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
175 else
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
176 HiLink cobolMarker Error
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
177 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
178 HiLink cobolCALLs Function
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
179 HiLink cobolComment Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
180 HiLink cobolKeys Comment
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
181 HiLink cobolAreaB Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
182 HiLink cobolCompiler PreProc
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
183 HiLink cobolCondFlow Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
184 HiLink cobolCopy PreProc
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
185 HiLink cobolDeclA cobolDecl
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
186 HiLink cobolDecl Type
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
187 HiLink cobolExtras Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
188 HiLink cobolGoTo Special
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
189 HiLink cobolConstant Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
190 HiLink cobolNumber Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
191 HiLink cobolPic Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
192 HiLink cobolReserved Statement
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
193 HiLink cobolDivision Label
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
194 HiLink cobolSection Label
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
195 HiLink cobolParagraph Label
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
196 HiLink cobolDivisionName Keyword
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
197 HiLink cobolSectionName Keyword
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
198 HiLink cobolParagraphName Keyword
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
199 HiLink cobolString Constant
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
200 HiLink cobolTodo Todo
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
201 HiLink cobolWatch Special
1125
96cd8222a819 updated for version 7.1a
vimboss
parents: 7
diff changeset
202 HiLink cobolIndicator Special
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
203
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
204 delcommand HiLink
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
205 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
206
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
207 let b:current_syntax = "cobol"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
208
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
209 " vim: ts=6 nowrap