<?xml version="1.0" encoding="Windows-1251"?>
<!--
    Atlantis 1.5 Syntax by Vladimir Fonarev <vol@quorum.ru>
                                            [2:5020/2160]
-->

<hrc version="take5">
  
  <type name="rpt" access="public">

    <region name="RptPreProc"   parent="atl:QrmPreproc"/>
    <region name="RptPrePrWord" parent="atl:QrmPreprocWord"/>
    <region name="RptWord"      parent="def:Keyword"/>
    <region name="RptDlgWord"   parent="def:Keyword"/>
    <region name="RptFormWord"  parent="def:Keyword"/>
    <region name="RptTypeWord"  parent="def:TypeKeyword"/>
    <region name="RptBool"      parent="def:BooleanConstant"/>
    <region name="RptLabel"     parent="def:Label"/>

    <scheme name="RptAny">
      <inherit scheme="atl:qrmBase"/>
      <keywords ignorecase="yes" region="RptTypeWord">
        <word name="STRING"/>
        <word name="POINTER"/>
        <word name="LONGINT"/>
        <word name="DOUBLE"/>
        <word name="WORD"/>
        <word name="INTEGER"/>
        <word name="BYTE"/>
        <word name="SINGLE"/>
        <word name="DATE"/>
        <word name="TIME"/>
        <word name="CHAR"/>
        <word name="EXTENDED"/>
        <word name="BOOLEAN"/>
      </keywords>
    </scheme>

    <scheme name="RptPrePro">
  <!-- Rpt preprocessor -->
      <block start="/^\s*#\b((include))\b/i" end="/$/" scheme="RptPrePro" region="RptPreProc" region00="RptPrePrWord"/>
      <keywords ignorecase="yes" region="RptPrePrWord">
      </keywords>
    </scheme>

    <scheme name="RptInDlg">
  <!-- paired -->
      <block start="/(&lt;&lt;)/" end="/(&gt;&gt;)/" scheme="RptAny" region00="RptWord" region10="RptWord" region01="def:PairStart" region11="def:PairEnd"/>
    </scheme>

    <scheme name="RptDlg">
      <inherit scheme="RptInDlg"/>
      <inherit scheme="RptAny"/>
      <keywords ignorecase="yes" region="RptDlgWord">
        <word name="FIELDS"/>
        <word name="BUTTONS"/>
        <word name="DEFAULT"/>
      </keywords>
    </scheme>

    <scheme name="RptFnc">
      <inherit scheme="RptPrePro">
        <virtual scheme="RptPrePro" subst-scheme="RptFnc"/>
      </inherit>
  <!-- paired block -->
      <inherit scheme="atl:qrmPairedBrackets">
        <virtual scheme="atl:qrmPairedBrackets" subst-scheme="RptFnc"/>
      </inherit>
  <!-- Labels -->
      <regexp match="/^:\s*[A-Za-z]\w*\s*$/" region0="RptLabel"/>
  <!-- GOTO command -->
      <regexp match="/(goto)\s+([A-Za-z_]\w*\b)/i" region1="RptWord" region2="RptLabel"/>
      <regexp match="/(goto)\s+([\w\S]*\b)/i" region1="RptWord" region2="def:ErrorText"/>
      <regexp match="/(call)\s+([A-Za-z_]\w*\b)/i" region1="RptWord" region2="RptLabel"/>
      <regexp match="/(call)\s+([\w\S]*\b)/i" region1="RptWord" region2="def:ErrorText"/>
      <keywords ignorecase="yes" region="RptWord">
        <word name="IF"/>
        <word name="NOT"/>
        <word name="AND"/>
        <word name="XOR"/>
        <word name="OR"/>
        <word name="ELSE"/>
        <word name="DO"/>
        <word name="WHILE"/>
        <word name="BREAK"/>
        <word name="CONTINUE"/>
        <word name="RESULT"/>
        <word name="EXIT"/>
        <word name="HALT"/>
        <word name="WRITE"/>
        <word name="PUTEVENT"/>
        <word name="FLUSH"/>
      </keywords>
      <keywords ignorecase="yes" region="RptTypeWord">
        <word name="TRUE" region="RptBool"/>
        <word name="FALSE" region="RptBool"/>
      </keywords>
      <inherit scheme="RptAny"/>
    </scheme>

    <scheme name="RptForm">
      <!--inherit scheme="RptPrePro">
        <virtual scheme="RptPrePro" subst="RptForm"/>
      </inherit-->
  <!-- linear comments -->
      <regexp match="/(^!.*$)/" region0="def:Comment"/>
      <block start="/\/\*/" end="/\*\//" scheme="def:Comment" region="def:Comment" region00="def:PairStart" region10="def:PairEnd"/>
  <!-- paired block -->
      <block start="/(\.\{)/" end="/(\.\})/" scheme="RptForm" region00="def:SymbolStrong" region01="def:PairStart" region10="def:SymbolStrong" region11="def:PairEnd"/>
      <block start="/(\.if)/i" end="/(\.end)/i" scheme="RptForm" region00="def:SymbolStrong" region01="def:PairStart" region10="def:SymbolStrong" region11="def:PairEnd"/>
      <keywords region="def:Symbol">
        <symb name="&amp;" region="def:SymbolStrong"/>
        <symb name="@" region="def:SymbolStrong"/>
        <symb name="^" region="def:SymbolStrong"/>
      </keywords>
      <keywords ignorecase="yes" region="RptFormWord">
        <word name=".ELSE" region="def:SymbolStrong"/>
      </keywords>
    </scheme>

    <scheme name="RptBr">
      <inherit scheme="RptAny"/>
      <keywords ignorecase="yes" region="RptWord">
        <word name="READONLY"/>
        <word name="NORMAL"/>
        <word name="NOOPEN"/>
        <word name="BUILD"/>
        <word name="NEW"/>
      </keywords>
    </scheme>

    <scheme name="rpt">
      <inherit scheme="RptPrePro">
        <virtual scheme="RptPrePro" subst-scheme="RptFnc"/>
      </inherit>
  <!-- paired block -->
      <inherit scheme="atl:qrmPairedBlock">
        <virtual scheme="atl:qrmPairedBlock" subst-scheme="RptFnc"/>
      </inherit>
      <inherit scheme="atl:qrmPairedBrackets">
        <virtual scheme="atl:qrmPairedBrackets" subst-scheme="RptBr"/>
      </inherit>
  <!-- objects -->
      <regexp match="/(\b(procedure|function)(\s*$|\s+\w*))?=/ix" region1="atl:FunctionOutline"/>
      <regexp match="/(\b(dialog)(\s*$|\s+\w*))?=/ix" region1="atl:DialogOutline"/>
      <regexp match="/(\b(dialog|procedure|function)\b[^\s])/ix" region0="def:ErrorText"/>
      <regexp match="/(\bformula\b)?=/ix" region1="atl:FunctionOutline"/>
  <!-- paired -->
      <block start="/\b((dialog))\b\M[\s\/]+/i" end="/\b(end)\b/i" scheme="RptDlg" region00="RptWord" region01="def:PairStart" region10="RptWord" region11="def:PairEnd"/>
      <block start="/^\b(form)\b/i" end="/^\b(endform)\b/i" scheme="RptForm" region00="RptWord" region10="RptWord" region01="def:PairStart" region11="def:PairEnd"/>
      <inherit scheme="RptAny"/>
      <keywords ignorecase="yes" region="RptWord">
        <word name="TABLES"/>
        <word name="DIALOGS"/>
        <word name="VAR"/>
        <word name="CONST"/>
        <word name="PROCEDURE"/>
        <word name="FUNCTION"/>
        <word name="FORMULA"/>
      </keywords>
  <!--regexp match="/^.*\s*(\b\w+\b)\s*\M\{/" region0="dFunction" region1="RptLabel"/-->
      <block start="/\s*\m(\b[A-Za-z_]\w*\b)\M\s*\{/" end="/~\s*\m\{/" scheme="rpt" region00="atl:FunctionOutline" region01="RptLabel"/>
      <block start="/\s*\m(\b[A-Za-z_]\w*\b)\M(\s*\/\*.*\*\/\s*)*\{/" end="/~(\s*\/\*.*\*\/\s*)*\m\{/" scheme="rpt" region00="atl:FunctionOutline" region01="RptLabel"/>
      <block start="/([A-Za-z_]\w*\b)\M(\s*$)/" end="/~(\s*$)(^\s*\{)?=/" scheme="rpt" region00="atl:FunctionOutline" region01="RptLabel"/>
      <block start="/([A-Za-z_]\w*\b)\M(\s*\/\/.*$)/" end="/~(\s*\/\/.*$)(^\s*\{)?=/" scheme="rpt" region00="atl:FunctionOutline" region01="RptLabel"/>
      <block start="/([A-Za-z_]\w*\b)\M((\s*\/\*.*)(\*\/\s*)*(\s*\/\/.*)*$)/" end="/~((\s*\/\*.*)(\*\/\s*)*(\s*\/\/.*)*$)(^\s*\{)?=/" scheme="rpt" region00="atl:FunctionOutline" region01="RptLabel"/>

    </scheme>

  </type>

</hrc>
