ygroups>
          <token type="Keyword"/>
          <token type="Text"/>
          <token type="NameNamespace"/>
          <token type="Keyword"/>
        </bygroups>
      </rule>
      <rule pattern="(use)(\s+)([a-z_][\w.]*)">
        <bygroups>
          <token type="Keyword"/>
          <token type="Text"/>
          <token type="NameNamespace"/>
        </bygroups>
      </rule>
      <rule pattern="(std|ieee)(\.[a-z_]\w*)">
        <bygroups>
          <token type="NameNamespace"/>
          <token type="NameNamespace"/>
        </bygroups>
      </rule>
      <rule pattern="(ieee|work|std)\b">
        <token type="NameNamespace"/>
      </rule>
      <rule pattern="(entity|component)(\s+)([a-z_]\w*)">
        <bygroups>
          <token type="Keyword"/>
          <token type="Text"/>
          <token type="NameClass"/>
        </bygroups>
      </rule>
      <rule pattern="(architecture|configuration)(\s+)([a-z_]\w*)(\s+)(of)(\s+)([a-z_]\w*)(\s+)(is)">
        <bygroups>
          <token type="Keyword"/>
          <token type="Text"/>
          <token type="NameClass"/>
          <token type="Text"/>
          <token type="Keyword"/>
          <token type="Text"/>
          <token type="NameClass"/>
          <token type="Text"/>
          <token type="Keyword"/>
        </bygroups>
      </rule>
      <rule pattern="([a-z_]\w*)(:)(\s+)(process|for)">
        <bygroups>
          <token type="NameClass"/>
          <token type="Operator"/>
          <token type="Text"/>
          <token type="Keyword"/>
        </bygroups>
      </rule>
      <rule pattern="(end)(\s+)">
        <bygroups>
          <token type="Keyword"/>
          <token type="Text"/>
        </bygroups>
        <push state="endblock"/>
      </rule>
      <rule>
        <include state="types"/>
      </rule>
      <rule>
        <include state="keywords"/>
      </rule>
      <rule>
        <include state="numbers"/>
      </rule>
      <rule pattern="[a-z_]\w*">
        <token type="Name"/>
      </rule>
    </state>
    <state name="endblock">
      <rule>
        <include state="keywords"/>
      </rule>
      <rule pattern="[a-z_]\w*">
        <token type="NameClass"/>
      </rule>
      <rule pattern="(\s+)">
        <token type="Text"/>
      </rule>
      <rule pattern=";">
        <token type="Punctuation"/>
        <pop depth="1"/>
      </rule>
    </state>
    <state name="types">
      <rule pattern="(std_ulogic_vector|file_open_status|std_logic_vector|severity_level|file_open_kind|delay_length|std_ulogic|bit_vector|character|std_logic|positive|unsigned|boolean|natural|integer|signed|string|time|bit)\b">
        <token type="KeywordType"/>
      </rule>
    </state>
    <state name="keywords">
      <rule pattern="(configuration|architecture|disconnect|attribute|transport|postponed|procedure|component|function|variable|severity|constant|generate|register|inertial|package|library|guarded|linkage|generic|subtype|process|literal|record|entity|others|shared|signal|downto|access|assert|return|reject|buffer|impure|select|elsif|inout|until|label|range|group|units|begin|array|alias|after|block|while|null|next|file|when|wait|open|nand|exit|then|case|port|type|loop|else|pure|with|xnor|body|not|rem|bus|rol|ror|xor|abs|end|and|sla|sll|sra|srl|all|out|nor|mod|map|for|new|use|or|on|of|in|if|is|to)\b">
        <token type="Keyword"/>
      </rule>
    </state>
    <state name="numbers">
      <rule pattern="\d{1,2}#[0-9a-f_]+#?">
        <token type="LiteralNumberInteger"/>
      </rule>
      <rule pattern="\d+">
        <token type="LiteralNumberInteger"/>
      </rule>
      <rule pattern="(\d+\.\d*|\.\d+|\d+)E[+-]?\d+">
        <token type="LiteralNumberFloat"/>
      </rule>
      <rule pattern="X&#34;[0-9a-f_]+&#34;">
        <token type="LiteralNumberHex"/>
      </rule>
      <rule pattern="O&#34;[0-7_]+&#34;">
        <token type="LiteralNumberOct"/>
      </rule>
      <rule pattern="B&#34;[01_]+&#34;">
        <token type="LiteralNumberBin"/>
      </rule>
    </state>
  </rules>
</lexer>