<?xml version="1.0" encoding="windows-1251"?>
<!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN" "../hrc.dtd">
<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc">
   <type name="sml" access="public">
      <annotation>
         <documentation><![CDATA[
           Standard ML Syntax
           <filename>/\.(sml|sig)$/i</filename>
         ]]></documentation>
         <contributors>
           Eugene Kotlyarov 2:5058/26.9@fidonet.org http://ekot.narod.ru/far
         </contributors>
      </annotation>

      <region name="String" parent="def:String"/>
      <region name="Comment" parent="def:Comment"/>
      <region name="Symbol" parent="def:Symbol"/>
      <region name="Keyword" parent="def:Keyword"/>
      <region name="Number" parent="def:Number"/>
      <region name="PairStart" parent="def:PairStart"/>
      <region name="PairEnd" parent="def:PairEnd"/>

      <scheme name="NestedComment">
        <inherit scheme="def:Comment"/>
        <block scheme="NestedComment" region="Comment">
          <start region="PairStart">/\(\*/</start>
          <end region="PairEnd">/\*\)/</end>
        </block>
      </scheme>
      <scheme name="sml">
<!-- Comments -->
         <block start="/\(\*/" end="/\*\)/" scheme="NestedComment" region="Comment" region00="PairStart" region10="PairEnd"/>
<!-- paired -->
         <block start="/(\()/" end="/(\))/" scheme="sml" region00="Symbol" region01="PairStart" region10="Symbol" region11="PairEnd"/>
         <block start="/(\[)/" end="/(\])/" scheme="sml" region00="Symbol" region01="PairStart" region10="Symbol" region11="PairEnd"/>
         <block start="/(\{)/" end="/(\})/" scheme="sml" region00="Symbol" region01="PairStart" region10="Symbol" region11="PairEnd"/>
         <block start="/\b(let|local|with|struct|sig)\b/" end="/\b(end)\b/" scheme="sml"
           region01="Keyword" region00="PairStart"
           region10="Keyword" region11="PairEnd"/>
         <regexp match="/^ \s* \M (fun|fn) \s+ (?{def:Outlined}[_\w]+)/ix"/>
         <inherit scheme="c:String"/>
<!-- Character constants  -->
         <regexp match="/ #&#34;( \\. | [^\\&#34;] )&#34; /x" region="String"/>
<!-- Integer constants  0 ~0 4 ~04 999999 0xffff -->
         <regexp match="/\~?\b(\d+|0x[\da-fA-F]+)\b/" region="Number"/>
<!-- Word constants  0w0 0w4 0w999999 0wxFFFF 0wx1ff -->
         <regexp match="/\~?\b(0w[\d]+|0wx[\da-fA-F]+)\b/" region="Number"/>
<!-- Real constants  0.7 ~0.7 3.32E5 3E~7 ~3E~7 3e~7 ~3e~7 -->
         <regexp match="/\~?\b([0-9]+[\.]?[0-9]*(e[\~]?[\d]+)?)\b/i" region="Number"/>
<!-- Symbols -->
         <keywords region="Symbol">
<!-- reserved -->
            <symb name=","/>
            <symb name=":"/>
            <symb name=":&gt;"/>
            <symb name=";"/>
            <symb name="..."/>
            <symb name="|"/>
            <symb name="="/>
            <symb name="=&gt;"/>
            <symb name="-&gt;"/>
            <symb name="#"/>
            <symb name="*"/>
<!-- other -->
            <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;"/>
         </keywords>
         <keywords region="Keyword">
<!-- reserved words -->
            <word name="abstype"/>
            <word name="and"/>
            <word name="andalso"/>
            <word name="as"/>
            <word name="case"/>
            <word name="do"/>
            <word name="datatype"/>
            <word name="else"/>
            <word name="end"/>
            <word name="eqtype"/>
            <word name="exception"/>
            <word name="fn"/>
            <word name="fun"/>
            <word name="functor"/>
            <word name="handle"/>
            <word name="if"/>
            <word name="in"/>
            <word name="infix"/>
            <word name="infixr"/>
            <word name="let"/>
            <word name="local"/>
            <word name="nonfix"/>
            <word name="of"/>
            <word name="op"/>
            <word name="open"/>
            <word name="orelse"/>
            <word name="raise"/>
            <word name="rec"/>
            <word name="sig"/>
            <word name="signature"/>
            <word name="struct"/>
            <word name="structure"/>
            <word name="then"/>
            <word name="type"/>
            <word name="val"/>
            <word name="where"/>
            <word name="with"/>
            <word name="withtype"/>
            <word name="while"/>
            <word name="SOME"/>
            <word name="NONE"/>
<!-- Built-in types -->
            <word name="array"/>
            <word name="bool"/>
            <word name="char"/>
            <word name="int"/>
            <word name="list"/>
            <word name="real"/>
            <word name="string"/>
            <word name="unit"/>
            <word name="vector"/>
            <word name="word"/>
            <word name="word8"/>
            <word name="true"/>
            <word name="false"/>
<!-- SML.NET -->
            <word name="exn"/>
            <word name="heap"/>
            <word name="object"/>
            <word name="_classtype"/>
            <word name="_interfacetype"/>
         </keywords>
      </scheme>
   </type>
</hrc>
