       <token type="KeywordConstant"/>
      </rule>
      <rule pattern="\[">
        <token type="Punctuation"/>
        <push state="argumentlist"/>
      </rule>
      <rule pattern="{">
        <token type="Punctuation"/>
        <push state="nbtobjectvalue"/>
      </rule>
      <rule pattern="~">
        <token type="NameBuiltin"/>
      </rule>
      <rule pattern="([a-zA-Z_]+:)?[a-zA-Z_]+\b">
        <token type="Text"/>
      </rule>
      <rule pattern="([a-z]+)(\.)([0-9]+)\b">
        <bygroups>
          <token type="Text"/>
          <token type="Punctuation"/>
          <token type="LiteralNumber"/>
        </bygroups>
      </rule>
      <rule pattern="([&lt;&gt;=]|&lt;=|&gt;=)">
        <token type="Punctuation"/>
      </rule>
      <rule>
        <include state="simplevalue"/>
      </rule>
      <rule pattern="\s+">
        <token type="TextWhitespace"/>
      </rule>
    </state>
    <state name="simplevalue">
      <rule pattern="(true|false)">
        <token type="KeywordConstant"/>
      </rule>
      <rule pattern="[01]b">
        <token type="LiteralNumber"/>
      </rule>
      <rule pattern="-?(0|[1-9]\d*)(\.\d+[eE](\+|-)?\d+|[eE](\+|-)?\d+|\.\d+)">
        <token type="LiteralNumberFloat"/>
      </rule>
      <rule pattern="(-?\d+)(\.\.)(-?\d+)">
        <bygroups>
          <token type="LiteralNumberInteger"/>
          <token type="Punctuation"/>
          <token type="LiteralNumberInteger"/>
        </bygroups>
      </rule>
      <rule pattern="-?(0|[1-9]\d*)">
        <token type="LiteralNumberInteger"/>
      </rule>
      <rule pattern="&#34;(\\\\|\\&#34;|[^&#34;])*&#34;">
        <token type="LiteralStringDouble"/>
      </rule>
      <rule pattern="&#39;[^&#39;]+&#39;">
        <token type="LiteralStringSingle"/>
      </rule>
      <rule pattern="([!#]?)(\w+)">
        <bygroups>
          <token type="Punctuation"/>
          <token type="Text"/>
        </bygroups>
      </rule>
    </state>
    <state name="nbtobjectattribute">
      <rule>
        <include state="nbtvalue"/>
      </rule>
      <rule pattern=":">
        <token type="Punctuation"/>
      </rule>
      <rule pattern=",">
        <token type="Punctuation"/>
        <pop depth="1"/>
      </rule>
      <rule pattern="\}">
        <token type="Punctuation"/>
        <pop depth="2"/>
      </rule>
    </state>
  </rules>
</lexer>
