docs: public static String parseSessionVariables(String sessionVariable) {
      StringBuilder out = new StringBuilder();
      StringBuilder sb = new StringBuilder();
      Parse state = Parse.Normal;
      boolean iskey = true;
      boolean singleQuotes = true;
      boolean first = true;
      String key = null;
  
      char[] chars = sessionVariable.toCharArray();
  
      for (char car : chars) {
  
        if (state == Parse.Escape) {
          sb.append(car);
          state = singleQuotes ? Parse.Quote : Parse.String;
          continue;
        }
  
        switch (car) {
          case '"':
            if (state == Parse.Normal) {
              state = Parse.String;
              singleQuotes = false;
            } else if (state == Parse.String && !singleQuotes) {
              state = Parse.Normal;
            }
            break;
  
          case '\'':
            if (state == Parse.Normal) {
              state = Parse.String;
              singleQuotes = true;
            } else if (state == Parse.String && singleQuotes) {
              state = Parse.Normal;
            }
            break;
  
          case '\\':
            if (state == Parse.String) {
              state = Parse.Escape;
            }
            break;
  
          case ';':
          case ',':
            if (state == Parse.Normal) {
              if (!iskey) {
                if (!first) {
                  out.append(",");
                }
                out.append(key);
                out.append(sb.toString());
                first = false;
              } else {
                key = sb.toString().trim();
                if (!key.isEmpty()) {
                  if (!first) {
                    out.append(",");
                  }
                  out.append(key);
                  first = false;
                }
              }
              iskey = true;
              key = null;
              sb = new StringBuilder();
              continue;
            }
            break;
  
          case '=':
            if (state == Parse.Normal && iskey) {
              key = sb.toString().trim();
              iskey = false;
              sb = new StringBuilder();
            }
            break;
  
          default:
            //nothing
        }
  
        sb.append(car);
      }
  
      if (!iskey) {
        if (!first) {
          out.append(",");
        }
        out.append(key);
        out.append(sb.toString());
      } else {
        String tmpkey = sb.toString().trim();
        if (!tmpkey.isEmpty() && !first) {
          out.append(",");
        }
        out.append(tmpkey);
      }
      return out.toString();
    }