en type="Operator"/>
      </rule>
      <rule pattern="\b(unit|nat|bool|string|ascii|list)\b">
        <token type="KeywordType"/>
      </rule>
      <rule pattern="[^\W\d][\w&#39;]*">
        <token type="Name"/>
      </rule>
      <rule pattern="\d[\d_]*">
        <token type="LiteralNumberInteger"/>
      </rule>
      <rule pattern="0[xX][\da-fA-F][\da-fA-F_]*">
        <token type="LiteralNumberHex"/>
      </rule>
      <rule pattern="0[oO][0-7][0-7_]*">
        <token type="LiteralNumberOct"/>
      </rule>
      <rule pattern="0[bB][01][01_]*">
        <token type="LiteralNumberBin"/>
      </rule>
      <rule pattern="-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)">
        <token type="LiteralNumberFloat"/>
      </rule>
      <rule pattern="&#39;(?:(\\[\\\&#34;&#39;ntbr ])|(\\[0-9]{3})|(\\x[0-9a-fA-F]{2}))&#39;">
        <token type="LiteralStringChar"/>
      </rule>
      <rule pattern="&#39;.&#39;">
        <token type="LiteralStringChar"/>
      </rule>
      <rule pattern="&#39;">
        <token type="Keyword"/>
      </rule>
      <rule pattern="&#34;">
        <token type="LiteralStringDouble"/>
        <push state="string"/>
      </rule>
      <rule pattern="[~?][a-z][\w\&#39;]*:">
        <token type="Name"/>
      </rule>
    </state>
    <state name="comment">
      <rule pattern="[^(*)]+">
        <token type="Comment"/>
      </rule>
      <rule pattern="\(\*">
        <token type="Comment"/>
        <push/>
      </rule>
      <rule pattern="\*\)">
        <token type="Comment"/>
        <pop depth="1"/>
      </rule>
      <rule pattern="[(*)]">
        <token type="Comment"/>
      </rule>
    </state>
  </rules>
</lexer>---