<?xml version="1.0" encoding="windows-1251"?>
<!--
   COBOL Syntax description
   Written by Alexey Matiushkin <matiushkin@hotmail.com>
   Thanks to Cail Lomecb!

   Known bugs:
   1. I was forced to make a choice between identifiers (LOOP-VAR) and directives (PROGRAM-ID). I'll solve this!
-->
<!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN" "../hrc.dtd">
<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc">
   <type name="cobol" access="public">

      <import type="def"/>

      <region name="cobIdent" parent="String"/>
      <region name="cobDirect" parent="Directive"/>
      <region name="cobString" parent="String"/>
      <region name="cobComment" parent="Comment"/>
      <region name="cobWord" parent="Keyword"/>
      <region name="cobSymb" parent="Keyword"/>
      <region name="cobNumb" parent="Number"/>

      <region name='SectionOutline' parent='def:Outlined'/>

      <scheme name="cobol">
         <regexp match="/^(?{SectionOutline}[A-Z_]+[A-Z_\-\s\.]*)\.$/i" region="Label"/>
<!-- Comments-->
         <regexp match="/\M^.{6}?([^\s\-].*)$/" region1="cobComment"/>
         <regexp match="/\M^.{72}?\s*(.*)$/" region1="cobComment"/>
<!--
   <block start="/^.\M.{72}/" end="/~.{71}\m.*$/" scheme="cobol" region10="cobComment"/>
   -->
<!-- Standard COBOL Identifiers -->
         <regexp match="/^.{6}?[\s\-]+\m(\b[\w\d]+)(\-)([\s]+)\M\-/" region1="cobDirect" region2="cobDirect" region3="cobDirect"/>
         <regexp match="/(\b\w+)(\-)([^\s\r\n\,\.]+)/" region1="cobIdent" region2="cobIdent" region3="cobIdent"/>
         <inherit scheme="def:Number"/>
         <inherit scheme="CString"/>
         <regexp match="/('..??.??.??')/" region0="cobString"/>
<!-- Multyline Strings ... -->
         <block start="/\&#34;/" end="/^.{6}\-/" scheme="Comment" region="cobString" region00="PairStart" region10="PairEnd"/>
<!-- Standard COBOL Symbols -->
         <keywords region="cobSymb">
            <symb name=";"/>
            <symb name="="/>
            <symb name="+"/>
            <symb name="-"/>
            <symb name="/"/>
            <symb name="*"/>
            <symb name="&amp;"/>
            <symb name="|"/>
            <symb name="^"/>
            <symb name="("/>
            <symb name=")"/>
            <symb name="["/>
            <symb name="]"/>
            <symb name=","/>
            <symb name="."/>
            <symb name=":"/>
            <symb name="!"/>
            <symb name="~"/>
            <symb name="&lt;"/>
            <symb name="&gt;"/>
            <symb name="%"/>
            <symb name="{"/>
            <symb name="}"/>
            <symb name="?"/>
         </keywords>
<!-- COBOL Directives -->
         <keywords ignorecase="yes" region="cobDirect">
            <word name="AUTHOR"/>
            <word name="CONFIGURATION"/>
            <word name="DATA"/>
            <word name="DATE-COMPILED"/>
            <word name="DATE-WRITTEN"/>
            <word name="DIVISION"/>
            <word name="ENVIRONMENT"/>
            <word name="FILE"/>
            <word name="FILE-CONTROL"/>
            <word name="IDENTIFICATION"/>
            <word name="INPUT-OUTPUT"/>
            <word name="LINKAGE"/>
            <word name="OBJECT-COMPUTER"/>
            <word name="PROCEDURE"/>
            <word name="PROGRAM-ID"/>
            <word name="SECTION"/>
            <word name="SOURCE-COMPUTER"/>
            <word name="WORKING-STORAGE"/>
         </keywords>
<!-- COBOL KeyWords -->
         <keywords ignorecase="yes" region="cobWord">
            <word name="ACCEPT"/>
            <word name="ACCESS"/>
            <word name="ADD"/>
            <word name="ADVANCING"/>
            <word name="AFTER"/>
            <word name="ALL"/>
            <word name="ALPHABET"/>
            <word name="ALPHABETIC"/>
            <word name="ALPHABETIC-LOWER"/>
            <word name="ALPHABETIC-UPPER"/>
            <word name="ALPHANUMERIC"/>
            <word name="ALPHANUMERIC-EDITED"/>
            <word name="ALPHBET"/>
            <word name="ALSO"/>
            <word name="ALTER"/>
            <word name="ALTERNATE"/>
            <word name="AND"/>
            <word name="ANY"/>
            <word name="ARE"/>
            <word name="AREA"/>
            <word name="AREAS"/>
            <word name="ASCENDING"/>
            <word name="ASSIGN"/>
            <word name="AT"/>
            <word name="BEFORE"/>
            <word name="BINARY"/>
            <word name="BLANK"/>
            <word name="BLOCK"/>
            <word name="BOTTOM"/>
            <word name="BY"/>
            <word name="CALL"/>
            <word name="CANCEL"/>
            <word name="CD"/>
            <word name="CF"/>
            <word name="CH"/>
            <word name="CHARACTER"/>
            <word name="CHARACTERS"/>
            <word name="CLASS"/>
            <word name="CLOCK-UNITS"/>
            <word name="CLOSE"/>
            <word name="COBOL"/>
            <word name="CODE"/>
            <word name="CODE-SET"/>
            <word name="COLLATING"/>
            <word name="COLUMN"/>
            <word name="COMMA"/>
            <word name="COMMON"/>
            <word name="COMMUNICATION"/>
            <word name="COMP"/>
            <word name="COMPUTATIONAL"/>
            <word name="COMPUTE"/>
            <word name="CONSOLE"/>
            <word name="CONTAINS"/>
            <word name="CONTENT"/>
            <word name="CONTINUE"/>
            <word name="CONTROL"/>
            <word name="CONTROLS"/>
            <word name="CONVERTING"/>
            <word name="COPY"/>
            <word name="CORR"/>
            <word name="CORRESPONDING"/>
            <word name="COUNT"/>
            <word name="CRT"/>
            <word name="CURRENCY"/>
            <word name="CURSOR"/>
            <word name="DATE"/>
            <word name="DATE-COMPILED"/>
            <word name="DATE-WRITTEN"/>
            <word name="DAY"/>
            <word name="DAY-OF-WEEK"/>
            <word name="DE"/>
            <word name="DEBUB-SUB1"/>
            <word name="DEBUG-CONTENTS"/>
            <word name="DEBUG-ITEM"/>
            <word name="DEBUG-LINE"/>
            <word name="DEBUG-NAME"/>
            <word name="DEBUG-SUB2"/>
            <word name="DEBUG-SUB3"/>
            <word name="DEBUGGING"/>
            <word name="DECIMAL"/>
            <word name="DECIMAL-POINT"/>
            <word name="DECLARATIVES"/>
            <word name="DELETE"/>
            <word name="DELIMITED"/>
            <word name="DELIMITER"/>
            <word name="DEPENDING"/>
            <word name="DESCENDING"/>
            <word name="DESTINATION"/>
            <word name="DETAIL"/>
            <word name="DISABLE"/>
            <word name="DISPLAY"/>
            <word name="DIVIDE"/>
            <word name="DOWN"/>
            <word name="DUPLICATE"/>
            <word name="DYNAMIC"/>
            <word name="EGI"/>
            <word name="ELSE"/>
            <word name="EMI"/>
            <word name="ENABLE"/>
            <word name="END"/>
            <word name="END-ADD"/>
            <word name="END-CALL"/>
            <word name="END-COMPUTE"/>
            <word name="END-DELETE"/>
            <word name="END-DIVIDE"/>
            <word name="END-EVALUATE"/>
            <word name="END-IF"/>
            <word name="END-MULTIPLY"/>
            <word name="END-OF-PAGE"/>
            <word name="END-PERFORM"/>
            <word name="END-READ"/>
            <word name="END-RECIEVE"/>
            <word name="END-RETURN"/>
            <word name="END-REWRITE"/>
            <word name="END-SEARCH"/>
            <word name="END-START"/>
            <word name="END-STRING"/>
            <word name="END-SUBSTRACT"/>
            <word name="END-UNSTRING"/>
            <word name="END-WRITE"/>
            <word name="ENTER"/>
            <word name="EOF"/>
            <word name="EOP"/>
            <word name="EQUAL"/>
            <word name="ERROR"/>
            <word name="ESI"/>
            <word name="EVALUATE"/>
            <word name="EVERY"/>
            <word name="EXCEPTION"/>
            <word name="EXIT"/>
            <word name="EXTEND"/>
            <word name="EXTERNAL"/>
            <word name="FALSE"/>
            <word name="FD"/>
            <word name="FILLER"/>
            <word name="FINAL"/>
            <word name="FIRST"/>
            <word name="FOOTING"/>
            <word name="FOR"/>
            <word name="FROM"/>
            <word name="FROM"/>
            <word name="FUNCTION"/>
            <word name="GENERATE"/>
            <word name="GIVING"/>
            <word name="GLOVAL"/>
            <word name="GO"/>
            <word name="GREATER"/>
            <word name="GROUP"/>
            <word name="HEADING"/>
            <word name="HIGH-VALUE"/>
            <word name="HIGH-VALUES"/>
            <word name="I-O"/>
            <word name="I-O-CONTROL"/>
            <word name="IF"/>
            <word name="IN"/>
            <word name="INDEX"/>
            <word name="INDEXED"/>
            <word name="INDICATE"/>
            <word name="INITIAL"/>
            <word name="INITIALIZE"/>
            <word name="INITIATE"/>
            <word name="INPUT"/>
            <word name="INSPECT"/>
            <word name="INSTALLATION"/>
            <word name="INTO"/>
            <word name="INVALID"/>
            <word name="IS"/>
            <word name="JUST"/>
            <word name="JUSTIFIED"/>
            <word name="KEY"/>
            <word name="LABEL"/>
            <word name="LAST"/>
            <word name="LEADING"/>
            <word name="LEFT"/>
            <word name="LENGTH"/>
            <word name="LESS"/>
            <word name="LICK"/>
            <word name="LIMIT"/>
            <word name="LIMITS"/>
            <word name="LINAGE"/>
            <word name="LINAGE-COUNTER"/>
            <word name="LINE"/>
            <word name="LINE-COUNTER"/>
            <word name="LINES"/>
            <word name="LOCK"/>
            <word name="LOW-VALUE"/>
            <word name="LOW-VALUES"/>
            <word name="MEMORY"/>
            <word name="MERGE"/>
            <word name="MESSAGE"/>
            <word name="MODE"/>
            <word name="MODULES"/>
            <word name="MORE"/>
            <word name="MOVE"/>
            <word name="MULTIPLE"/>
            <word name="MULTIPLY"/>
            <word name="NATIVE"/>
            <word name="NEGATIVE"/>
            <word name="NEXT"/>
            <word name="NO"/>
            <word name="NOT"/>
            <word name="NUMBER"/>
            <word name="NUMERIC"/>
            <word name="NUMERIC-EDITED"/>
            <word name="OCCURS"/>
            <word name="OF"/>
            <word name="OFF"/>
            <word name="OMITTED"/>
            <word name="ON"/>
            <word name="OPEN"/>
            <word name="OPTIONAL"/>
            <word name="OR"/>
            <word name="ORDER"/>
            <word name="ORGANIZATION"/>
            <word name="OTHER"/>
            <word name="OUTPUT"/>
            <word name="OVERFLOW"/>
            <word name="PACKED-DECIMAL"/>
            <word name="PADDING"/>
            <word name="PAGE"/>
            <word name="PAGE-COUNTER"/>
            <word name="PAGES"/>
            <word name="PERFORM"/>
            <word name="PF"/>
            <word name="PH"/>
            <word name="PIC"/>
            <word name="PICTURE"/>
            <word name="PLUS"/>
            <word name="POINT"/>
            <word name="POINTER"/>
            <word name="POSITION"/>
            <word name="POSITIVE"/>
            <word name="PRINTING"/>
            <word name="PROCEDURES"/>
            <word name="PROCEED"/>
            <word name="PROGRAM"/>
            <word name="PURGE"/>
            <word name="QUEUE"/>
            <word name="QUOTE"/>
            <word name="QUOTES"/>
            <word name="RANDOM"/>
            <word name="RD"/>
            <word name="READ"/>
            <word name="RECIEVE"/>
            <word name="RECORD"/>
            <word name="RECORDS"/>
            <word name="REDEFINES"/>
            <word name="REEL"/>
            <word name="REFERENCE"/>
            <word name="REFERENCES"/>
            <word name="RELATIVE"/>
            <word name="RELEASE"/>
            <word name="REMAINDER"/>
            <word name="REMOVAL"/>
            <word name="RENAMES"/>
            <word name="REPLACE"/>
            <word name="REPLACING"/>
            <word name="REPORT"/>
            <word name="REPORTING"/>
            <word name="REPORTS"/>
            <word name="RERUN"/>
            <word name="RESERVE"/>
            <word name="RETURN"/>
            <word name="REVERSED"/>
            <word name="REWIND"/>
            <word name="REWRITE"/>
            <word name="RF"/>
            <word name="RH"/>
            <word name="RIGHT"/>
            <word name="ROUNDED"/>
            <word name="RUN"/>
            <word name="SAME"/>
            <word name="SCREEN"/>
            <word name="SD"/>
            <word name="SEARCH"/>
            <word name="SECURITY"/>
            <word name="SEGMENT"/>
            <word name="SEGMENT-LIMIT"/>
            <word name="SELECT"/>
            <word name="SEND"/>
            <word name="SENTENCE"/>
            <word name="SEPARATE"/>
            <word name="SEQUENCE"/>
            <word name="SEQUENTIAL"/>
            <word name="SET"/>
            <word name="SIGN"/>
            <word name="SIZE"/>
            <word name="SORT"/>
            <word name="SORT-MERGE"/>
            <word name="SOURCE"/>
            <word name="SPACE"/>
            <word name="SPACES"/>
            <word name="SPECIAL-NAMES"/>
            <word name="STANDARD"/>
            <word name="STANDARD-1"/>
            <word name="STANDARD-2"/>
            <word name="START"/>
            <word name="STATUS"/>
            <word name="STOP"/>
            <word name="STRING"/>
            <word name="SUB-QUEUE-1"/>
            <word name="SUB-QUEUE-2"/>
            <word name="SUB-QUEUE-3"/>
            <word name="SUBTRACT"/>
            <word name="SUM"/>
            <word name="SUPPRESS"/>
            <word name="SYMBOLIC"/>
            <word name="SYNC"/>
            <word name="SYNCHRONIZED"/>
            <word name="TALLYING"/>
            <word name="TAPE"/>
            <word name="TERMINAL"/>
            <word name="TERMINATE"/>
            <word name="TEST"/>
            <word name="TEXT"/>
            <word name="THAN"/>
            <word name="THEN"/>
            <word name="THROUGH"/>
            <word name="THRU"/>
            <word name="TIME"/>
            <word name="TIMES"/>
            <word name="TO"/>
            <word name="TOP"/>
            <word name="TRAILING"/>
            <word name="TRUE"/>
            <word name="TYPE"/>
            <word name="UNIT"/>
            <word name="UNSTRING"/>
            <word name="UNTIL"/>
            <word name="UP"/>
            <word name="UPON"/>
            <word name="USAGE"/>
            <word name="USE"/>
            <word name="USING"/>
            <word name="VALUE"/>
            <word name="VALUES"/>
            <word name="VARYING"/>
            <word name="WHEN"/>
            <word name="WITH"/>
            <word name="WORDS"/>
            <word name="WRITE"/>
            <word name="WRTIE"/>
            <word name="ZERO"/>
            <word name="ZEROES"/>
            <word name="ZEROS"/>
         </keywords>
      </scheme>

   </type>
</hrc>
