ule pattern="(?&lt;!\.)(Class|Structure|Enum)(\s+)">
        <bygroups>
          <token type="Keyword"/>
          <token type="Text"/>
        </bygroups>
        <push state="classname"/>
      </rule>
      <rule pattern="(?&lt;!\.)(Module|Namespace|Imports)(\s+)">
        <bygroups>
          <token type="Keyword"/>
          <token type="Text"/>
        </bygroups>
        <push state="namespace"/>
      </rule>
      <rule pattern="(?&lt;!\.)(Boolean|Byte|Char|Date|Decimal|Double|Integer|Long|Object|SByte|Short|Single|String|Variant|UInteger|ULong|UShort)\b">
        <token type="KeywordType"/>
      </rule>
      <rule pattern="(?&lt;!\.)(AddressOf|And|AndAlso|As|GetType|In|Is|IsNot|Like|Mod|Or|OrElse|TypeOf|Xor)\b">
        <token type="OperatorWord"/>
      </rule>
      <rule pattern="&amp;=|[*]=|/=|\\=|\^=|\+=|-=|&lt;&lt;=|&gt;&gt;=|&lt;&lt;|&gt;&gt;|:=|&lt;=|&gt;=|&lt;&gt;|[-&amp;*/\\^+=&lt;&gt;\[\]]">
        <token type="Operator"/>
      </rule>
      <rule pattern="&#34;">
        <token type="LiteralString"/>
        <push state="string"/>
      </rule>
      <rule pattern="_\n">
        <token type="Text"/>
      </rule>
      <rule pattern="[_\w][\w]*">
        <token type="Name"/>
      </rule>
      <rule pattern="#.*?#">
        <token type="LiteralDate"/>
      </rule>
      <rule pattern="(\d+\.\d*|\d*\.\d+)(F[+-]?[0-9]+)?">
        <token type="LiteralNumberFloat"/>
      </rule>
      <rule pattern="\d+([SILDFR]|US|UI|UL)?">
        <token type="LiteralNumberInteger"/>
      </rule>
      <rule pattern="&amp;H[0-9a-f]+([SILDFR]|US|UI|UL)?">
        <token type="LiteralNumberInteger"/>
      </rule>
      <rule pattern="&amp;O[0-7]+([SILDFR]|US|UI|UL)?">
        <token type="LiteralNumberInteger"/>
      </rule>
    </state>
    <state name="string">
      <rule pattern="&#34;&#34;">
        <token type="LiteralString"/>
      </rule>
      <rule pattern="&#34;C?">
        <token type="LiteralString"/>
        <pop depth="1"/>
      </rule>
      <rule pattern="[^&#34;]+">
        <token type="LiteralString"/>
      </rule>
    </state>
  </rules>
</lexer>