<?xml version="1.0" encoding="windows-1251"?>
<!--
    Mason (perl+html)
-->
<!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN" "../hrc.dtd">
<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc">
   <type name="mason" access="public">

      <import type="def"/>
      <import type="html"/>
      <import type="jScript"/>
      <import type="vbScript"/>

      <region name="masonText" parent="Insertion"/>
      <region name="masonText1" parent="Insertion"/>


      <scheme name="masonBlock">
         <block start="/(&lt;\%(perl|init|args|flags|filter|once)\&gt;)/" end="/(&lt;\/\%\y2\&gt;)/" scheme="mason_perl" region="masonText" region00="OpenTag" region10="CloseTag" region01="PairStart" region11="PairEnd"/>
         <block start="/(&lt;\%)/" end="/(\%\&gt;)/" scheme="mason_perl" region="masonText" region00="OpenTag" region10="CloseTag" region01="PairStart" region11="PairEnd"/>
         <block start="/(&lt;\&amp;)/" end="/(\&amp;\&gt;)/" scheme="Comment" region="masonText" region00="OpenTag" region10="CloseTag" region01="PairStart" region11="PairEnd"/>
         <block start="/^%/" end="/$/" scheme="mason_perl_1line" region="masonText1"/>
      </scheme>

      <scheme name="mason_perl_1line">
         <inherit scheme="perl:BuildinVars"/>
         <inherit scheme="perl:Vars"/>
         <inherit scheme="CString"/>
      </scheme>

      <scheme name="masonInverseBlock">
         <block start="/(&lt;\/\%(perl|init|args|flags|filter|once)\&gt;)/" end="/(&lt;\%\y2\&gt;)/" scheme="mason_html" priority="low" region="Text" region00="masonText" region10="masonText"/>
         <block start="/(\%&gt;)/" end="/(&lt;\%)/" scheme="mason_html" priority="low" region="Text" region00="masonText" region10="masonText"/>
      </scheme>

      <scheme name="masonRootBlock">
         <block start="/(&lt;\%(method|def) \s+ [^\s\&gt;]+? \&gt;)/x" end="/(&lt;\/\%\y2\&gt;)/" scheme="masonInclude" region="masonText" region00="OpenTag" region10="CloseTag" region01="PairStart" region11="PairEnd"/>
      </scheme>

      <scheme name="mason_perl">
         <regexp match="/\#.*? \M (\%&gt;|$) /ix" region="Comment"/>
         <inherit scheme="masonInverseBlock"/>
         <inherit scheme="perl:perl">
            <virtual scheme="perl:perl" subst-scheme="mason_perl"/>
         </inherit>
      </scheme>

      <scheme name="mason_html_ps">
         <inherit scheme="masonBlock"/>
         <inherit scheme="perl:perl">
            <virtual scheme="perl:META" subst-scheme="masonBlock"/>
            <virtual scheme="perl:perl" subst-scheme="mason_html_ps"/>
         </inherit>
      </scheme>

      <scheme name="mason_html_js">
         <inherit scheme="masonBlock"/>
         <inherit scheme="jScript">
            <virtual scheme="jsMETA" subst-scheme="masonBlock"/>
            <virtual scheme="jScript" subst-scheme="mason_html_js"/>
         </inherit>
      </scheme>

      <scheme name="mason_html_vbs">
         <inherit scheme="masonBlock"/>
         <inherit scheme="vbScript">
            <virtual scheme="vbMETA" subst-scheme="masonBlock"/>
            <virtual scheme="vbScript" subst-scheme="mason_html_vbs"/>
         </inherit>
      </scheme>

      <scheme name="mason_htmlString">
         <inherit scheme="masonBlock"/>
         <inherit scheme="htmlString"/>
      </scheme>

      <scheme name="mason_htmlCore">
         <inherit scheme="masonBlock"/>
         <inherit scheme="htmlCore">
            <virtual scheme="htmlString" subst-scheme="mason_htmlString"/>
         </inherit>
      </scheme>

      <scheme name="masonScripts">
         <inherit scheme="htmlScripts">
            <virtual scheme="perl:perl" subst-scheme="mason_html_ps"/>
            <virtual scheme="jScript" subst-scheme="mason_html_js"/>
            <virtual scheme="vbScript" subst-scheme="mason_html_vbs"/>
         </inherit>
      </scheme>

      <scheme name="masonComment">
         <inherit scheme="masonBlock">
            <virtual scheme="mason_html" subst-scheme="Comment"/>
         </inherit>
         <inherit scheme="Comment"/>
      </scheme>

      <scheme name="mason_html">
         <inherit scheme="html">
            <virtual scheme="htmlCore" subst-scheme="mason_htmlCore"/>
            <virtual scheme="htmlScripts" subst-scheme="masonScripts"/>
            <virtual scheme="html" subst-scheme="masonInclude"/>
            <virtual scheme="Comment" subst-scheme="masonComment"/>
         </inherit>
      </scheme>

      <scheme name="masonInclude">
         <inherit scheme="masonRootBlock"/>
         <inherit scheme="masonBlock"/>
         <inherit scheme="mason_html"/>
      </scheme>

      <scheme name="mason">
         <inherit scheme="masonInclude"/>
      </scheme>

   </type>
</hrc>
<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (the "License"); you may not use this file except in compliance with
   - the License. You may obtain a copy of the License at
   - http://www.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is the Colorer Library.
   -
   - The Initial Developer of the Original Code is
   - Cail Lomecb <cail@nm.ru>.
   - Portions created by the Initial Developer are Copyright (C) 1999-2003
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either the GNU General Public License Version 2 or later (the "GPL"), or
   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the LGPL or the GPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->
