#39;]*[^\\]&#39;))">
        <token type="NameConstant"/>
      </rule>
      <rule pattern="\$(?:(?:\\(?:[bdefnrstv\&#39;&#34;\\]|[0-7][0-7]?[0-7]?|(?:x[0-9a-fA-F]{2}|x\{[0-9a-fA-F]+\})|\^[a-zA-Z]))|\\[ %]|[^\\])">
        <token type="LiteralStringChar"/>
      </rule>
      <rule pattern="#(?:[a-z]\w*|&#39;[^\n&#39;]*[^\\]&#39;)(:?\.(?:[a-z]\w*|&#39;[^\n&#39;]*[^\\]&#39;))?">
        <token type="NameLabel"/>
      </rule>
      <rule pattern="\A#!.+\n">
        <token type="CommentHashbang"/>
      </rule>
      <rule pattern="#\{">
        <token type="Punctuation"/>
        <push state="map_key"/>
      </rule>
    </state>
    <state name="string">
      <rule pattern="(?:\\(?:[bdefnrstv\&#39;&#34;\\]|[0-7][0-7]?[0-7]?|(?:x[0-9a-fA-F]{2}|x\{[0-9a-fA-F]+\})|\^[a-zA-Z]))">
        <token type="LiteralStringEscape"/>
      </rule>
      <rule pattern="&#34;">
        <token type="LiteralString"/>
        <pop depth="1"/>
      </rule>
      <rule pattern="~[0-9.*]*[~#+BPWXb-ginpswx]">
        <token type="LiteralStringInterpol"/>
      </rule>
      <rule pattern="[^&#34;\\~]+">
        <token type="LiteralString"/>
      </rule>
      <rule pattern="~">
        <token type="LiteralString"/>
      </rule>
    </state>
    <state name="directive">
      <rule pattern="(define)(\s*)(\()((?:(?:[A-Z_]\w*)|(?:[a-z]\w*|&#39;[^\n&#39;]*[^\\]&#39;)))">
        <bygroups>
          <token type="NameEntity"/>
          <token type="Text"/>
          <token type="Punctuation"/>
          <token type="NameConstant"/>
        </bygroups>
        <pop depth="1"/>
      </rule>
      <rule pattern="(record)(\s*)(\()((?:(?:[A-Z_]\w*)|(?:[a-z]\w*|&#39;[^\n&#39;]*[^\\]&#39;)))">
        <bygroups>
          <token type="NameEntity"/>
          <token type="Text"/>
          <token type="Punctuation"/>
          <token type="NameLabel"/>
        </bygroups>
        <pop depth="1"/>
      </rule>
      <rule pattern="(?:[a-z]\w*|&#39;[^\n&#39;]*[^\\]&#39;)">
        <token type="NameEntity"/>
        <pop depth="1"/>
      </rule>
    </state>
    <state name="map_key">
      <rule>
        <include state="root"/>
      </rule>
      <rule pattern="=&gt;">
        <token type="Punctuation"/>
        <push state="map_val"/>
      </rule>
      <rule pattern=":=">
        <token type="Punctuation"/>
        <push state="map_val"/>
      </rule>
      <rule pattern="\}">
        <token type="Punctuation"/>
        <pop depth="1"/>
      </rule>
    </state>
    <state name="map_val">
      <rule>
        <include state="root"/>
      </rule>
      <rule pattern=",">
        <token type="Punctuation"/>
        <pop depth="1"/>
      </rule>
      <rule pattern="(?=\})">
        <token type="Punctuation"/>
        <pop depth="1"/>
      </rule>
    </state>
  </rules>
</lexer>