docstr: Parse a charset. Does not include the surrounding [].
docstr_tok: ["Parse","a","charset",".","Does","not","include","the","surrounding","[","]","."]
code: def parse_charset(self):
      """Parse a charset. Does not include the surrounding []."""
      char_list = []
      invert = 0
      if self.c == "^":
          invert = 1
          self.next()
      if self.c == "]":
          char_list.append("]")
          self.next()
      while not self.end and self.c != "]":
          c1 = self.get()
          if self.c == "-" and self.lookahead(1) != "]":
              self.next()
              c2 = self.get()
              for a in range(ord(c1), ord(c2) + 1):
                  char_list.append(chr(a))
          else:
              char_list.append(c1)
      chars = "".join(char_list)
      if invert:
          return AnyBut(chars)
      else:
          return Any(chars)
  
file_path: catboost/contrib/tools/cython/Cython/Plex/Traditional.py
imports: from __future__ import absolute_import
  from .Regexps import Alt, Seq, Rep, Rep1, Opt, Any, AnyBut, Bol, Eol, Char
  from .Errors import PlexError
label_desc: Use image node_id 7 for calling the REParser obj's underlying member method code with example usage: obj.parse_charset() and returns: AnyBut, Any