<?xml version="1.0" encoding="windows-1251"?>
<!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN"
  "http://colorer.sf.net/2003/hrc.dtd">
  
<!--
  HRC for FarMail message   
  (c) Written by Eugene Efremov <4mirror@mail.ru>

  insert this define into HRC base catalog file 
  (AFTER definition of type "messages"):
  
  <prototype name="farmailmsg" group="other" description="FarMail message">
    <location link="types/farmsg.hrc"/>
    <filename>/\.(msg|eml|<ohter-messages-ext>)$/i</filename>
    <firstline>/\%start\%/</firstline>
  </prototype>
-->


<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd">
 
<type name="farmailmsg" access="public">

 <annotation> 
  <documentation>
   Support FarMail message header 
  </documentation>
  <contributors> <![CDATA[
   Eugene Efremov <4mirror@mail.ru>
  ]]> </contributors>
 </annotation>

<!-- <import type="default"/>-->

 <region name="fm.Symbol" parent="def:Symbol"/>
 <region name="fm.Symbol2" parent="def:SymbolStrong"/>
 <region name="fm.Keyword" parent="def:Keyword"/>
 <region name="fm.Keyword2" parent="def:KeywordStrong"/>
 <region name="fm.String" parent="def:String"/>
 <region name="fm.Param" parent="def:Parameter"/>
 <region name="fm.Comment" parent="def:Comment"/>
 <region name="fm.EMail" parent="def:EMail"/>

 <scheme name="fmAddres">
  <keywords region="fm.Keyword">
   <symb name="@"/>
   <symb name="."/>
  </keywords>
  <keywords region="fm.Keyword2">
   <symb name="$"/>
  </keywords>
  <keywords region="fm.Symbol">
   <symb name="_"/>
   <symb name="-"/>
  </keywords>
 </scheme>

 <scheme name="fmHeader">
  <!--inherit scheme="Text"/-->
   <!--inherit scheme="mNetAddresses"/-->
  <inherit scheme="def:Apost"/>
  <inherit scheme="def:StandardString"/>
  <inherit scheme="def:DecNumber"/>
    
  <regexp match="/^(\s)*\;.*$/" region="fm.Comment"/>
  
  <regexp match="/\=(\s)*(Re)\M(\[\d\])?\:/" 
   region="fm.Symbol" region2="fm.Keyword"
  />
  <regexp match="/[\w\.\~\-_#]+(@)[\w\~\-_#]+?(\.[\w\~\-_#]+)+/" 
   region="fm.EMail" region1="fm.Keyword"
  />
  
  <block start="/^(\s)*attach/" end="/$/" scheme="def:Path" region00="fm.Keyword"/>
  
  <block start="/(&lt;)/" end="/(&gt;)/" 
   scheme="fmAddres" region="fm.EMail" 
   region00="def:PairStart"  region01="fm.String" 
   region10="def:PairEnd"    region11="fm.String" 
  />

  <keywords region="fm.Symbol">
   <symb name="="/>
   <symb name="]"/>
   <symb name="["/>
   <symb name=":"/>
  </keywords>
  <keywords region="fm.Keyword">
   <word name="set"/>
   <word name="header"/>
   <word name="appendheader"/>
   <word name="attach"/>
  </keywords>
  <keywords region="fm.Keyword2">
   <word name="Re"/>
  </keywords>
  <keywords region="fm.Param">
   <word name="%to%"/>
   <word name="%from%"/>
   <word name="%subj%"/>
   <word name="%cc%"/>
   <word name="%bcc%"/>
   <word name="%how%"/>
   <word name="%charset%"/>
   <word name="%encodeto%"/>
  </keywords>
 </scheme>


 <scheme name="farmailmsg">
  
  <block start="/(\%start\%)/" end="/(\%end\%)/" scheme="fmHeader"
   region00="def:PairStart" region01="fm.Symbol2" 
   region10="def:PairEnd"   region11="fm.Symbol2" 
  />

  <block start="/\M&lt;html/i" end="/&lt;\/html&gt;\m/i" 
   scheme="messages:eml_message_html" 
  />
  <inherit scheme="messages:eml_message_text"/>

  <!-- Quotes 
  <regexp match="/^(\s?.[^\s\>]+(>>)+[^>].*)/" region0="pktQuote2"/>
  <regexp match="/^(\s?.[^\s\>]+(>)+.*)/" region0="pktQuote"/>
  <regexp match="/^(\w+\>.*)/" region0="pktQuote"/>
  <regexp match="/^(\>.*)/" region0="pktQuote2"/>-->
 
 </scheme>
 
</type>
</hrc>
