Namespace" />
          <token type="TextWhitespace" />
          <token type="Punctuation" />
        </bygroups>
      </rule>
      <rule pattern="(abstract|endpoint|entrypoint|lazy|unique)(\s+)">
        <bygroups>
          <token type="KeywordDeclaration" />
          <token type="TextWhitespace" />
        </bygroups>
      </rule>
      <rule pattern="(rule)(\s+)">
        <bygroups>
          <token type="KeywordNamespace" />
          <token type="TextWhitespace" />
        </bygroups>
      </rule>
      <rule pattern="(helper)(\s+)">
        <bygroups>
          <token type="KeywordNamespace" />
          <token type="TextWhitespace" />
        </bygroups>
      </rule>
      <rule pattern="(context)(\s+)">
        <bygroups>
          <token type="KeywordNamespace" />
          <token type="TextWhitespace" />
        </bygroups>
      </rule>
      <rule pattern="(def)(\s*)(:)(\s*)">
        <bygroups>
          <token type="KeywordNamespace" />
          <token type="TextWhitespace" />
          <token type="Punctuation" />
          <token type="TextWhitespace" />
        </bygroups>
      </rule>
      <rule pattern="(Bag|Boolean|Integer|OrderedSet|Real|Sequence|Set|String|Tuple)">
        <token type="KeywordType" />
      </rule>
      <rule pattern="(\w+)(\s*)(&lt;-|&lt;:=)">
        <bygroups>
          <token type="NameNamespace" />
          <token type="TextWhitespace" />
          <token type="Punctuation" />
        </bygroups>
      </rule>
      <rule pattern="#&quot;">
        <token type="KeywordConstant" />
        <push state="quotedenumliteral" />
      </rule>
      <rule pattern="&quot;">
        <token type="NameNamespace" />
        <push state="quotedname" />
      </rule>
      <rule pattern="[^\S\n]+">
        <token type="TextWhitespace" />
      </rule>
      <rule pattern="&#x27;">
        <token type="LiteralString" />
        <push state="string" />
      </rule>
      <rule
        pattern="[0-9]*\.[0-9]+">
        <token type="LiteralNumberFloat" />
      </rule>
      <rule pattern="0|[1-9][0-9]*">
        <token type="LiteralNumberInteger" />
      </rule>
      <rule pattern="[*&lt;&gt;+=/-]">
        <token type="Operator" />
      </rule>
      <rule pattern="([{}();:.,!|]|-&gt;)">
        <token type="Punctuation" />
      </rule>
      <rule pattern="\n">
        <token type="TextWhitespace" />
      </rule>
      <rule pattern="\w+">
        <token type="NameNamespace" />
      </rule>
    </state>
    <state name="string">
      <rule pattern="[^\\&#x27;]+">
        <token type="LiteralString" />
      </rule>
      <rule pattern="\\\\">
        <token type="LiteralString" />
      </rule>
      <rule pattern="\\&#x27;">
        <token type="LiteralString" />
      </rule>
      <rule pattern="\\">
        <token type="LiteralString" />
      </rule>
      <rule pattern="&#x27;">
        <token type="LiteralString" />
        <pop depth="1" />
      </rule>
    </state>
    <state name="quotedname">
      <rule pattern="[^\\&quot;]+">
        <token type="NameNamespace" />
      </rule>
      <rule pattern="\\\\">
        <token type="NameNamespace" />
      </rule>
      <rule pattern="\\&quot;">
        <token type="NameNamespace" />
      </rule>
      <rule pattern="\\">
        <token type="NameNamespace" />
      </rule>
      <rule pattern="&quot;">
        <token type="NameNamespace" />
        <pop depth="1" />
      </rule>
    </state>
    <state name="quotedenumliteral">
      <rule pattern="[^\\&quot;]+">
        <token type="KeywordConstant" />
      </rule>
      <rule pattern="\\\\">
        <token type="KeywordConstant" />
      </rule>
      <rule pattern="\\&quot;">
        <token type="KeywordConstant" />
      </rule>
      <rule pattern="\\">
        <token type="KeywordConstant" />
      </rule>
      <rule pattern="&quot;">
        <token type="KeywordConstant" />
        <pop depth="1" />
      </rule>
    </state>
  </rules>
</lexer>
