
        <token type="Operator"/>
      </rule>
      <rule>
        <include state="py-keywords"/>
      </rule>
      <rule>
        <include state="py-builtins"/>
      </rule>
      <rule pattern="(eval-when-compile|eval-and-compile|with-decorator|unquote-splice|quasiquote|list_comp|unquote|foreach|kwapply|import|not-in|unless|is-not|quote|progn|slice|assoc|first|while|when|rest|cond|&lt;&lt;=|-&gt;&gt;|for|get|&gt;&gt;=|let|cdr|car|is|-&gt;|do|in|\||~|,) ">
        <token type="Keyword"/>
      </rule>
      <rule pattern="(defmacro|defclass|lambda|defun|defn|setv|def|fn) ">
        <token type="KeywordDeclaration"/>
      </rule>
      <rule pattern="(repeatedly|take_while|iterator\?|iterable\?|instance\?|distinct|take_nth|numeric\?|iterate|filter|repeat|remove|even\?|none\?|cycle|zero\?|odd\?|pos\?|neg\?|take|drop|inc|dec|nth) ">
        <token type="NameBuiltin"/>
      </rule>
      <rule pattern="(?&lt;=\()(?!#)[\w!$%*+&lt;=&gt;?/.#-]+">
        <token type="NameFunction"/>
      </rule>
      <rule pattern="(?!#)[\w!$%*+&lt;=&gt;?/.#-]+">
        <token type="NameVariable"/>
      </rule>
      <rule pattern="(\[|\])">
        <token type="Punctuation"/>
      </rule>
      <rule pattern="(\{|\})">
        <token type="Punctuation"/>
      </rule>
      <rule pattern="(\(|\))">
        <token type="Punctuation"/>
      </rule>
    </state>
    <state name="py-keywords">
      <rule pattern="(yield from|continue|finally|lambda|assert|global|except|return|print|yield|while|break|raise|elif|pass|exec|else|with|try|for|del|as|if)\b">
        <token type="Keyword"/>
      </rule>
    </state>
    <state name="py-builtins">
      <rule pattern="(?&lt;!\.)(staticmethod|classmethod|__import__|isinstance|basestring|issubclass|frozenset|raw_input|bytearray|enumerate|property|callable|reversed|execfile|hasattr|setattr|compile|complex|delattr|unicode|globals|getattr|unichr|reduce|xrange|buffer|intern|filter|locals|divmod|coerce|sorted|reload|object|slice|round|float|super|input|bytes|apply|tuple|range|iter|dict|long|type|hash|vars|next|file|exit|open|repr|eval|bool|list|bin|pow|zip|ord|oct|min|set|any|max|map|all|len|sum|int|dir|hex|chr|abs|cmp|str|id)\b">
        <token type="NameBuiltin"/>
      </rule>
      <rule pattern="(?&lt;!\.)(self|None|Ellipsis|NotImplemented|False|True|cls)\b">
        <token type="NameBuiltinPseudo"/>
      </rule>
      <rule pattern="(?&lt;!\.)(PendingDeprecationWarning|UnicodeTranslateError|NotImplementedError|UnicodeEncodeError|UnicodeDecodeError|DeprecationWarning|FloatingPointError|UnboundLocalError|KeyboardInterrupt|ZeroDivisionError|EnvironmentError|IndentationError|ArithmeticError|OverflowWarning|ReferenceError|RuntimeWarning|AttributeError|AssertionError|NotImplemented|UnicodeWarning|FutureWarning|BaseException|StopIteration|SyntaxWarning|OverflowError|StandardError|ImportWarning|GeneratorExit|RuntimeError|WindowsError|UnicodeError|LookupError|SyntaxError|SystemError|ImportError|MemoryError|UserWarning|ValueError|IndexError|SystemExit|Exception|TypeError|NameError|EOFError|VMSError|KeyError|TabError|IOError|OSError|Warning)\b">
        <token type="NameException"/>
      </rule>
    </state>
  </rules>
</lexer>