docs: private String makeMessageForParseException(ParseException exception) {
          final StringBuilder sb = new StringBuilder("Parse error. Found ");
          final StringBuilder expected = new StringBuilder();
  
          int maxExpectedTokenSequenceLength = 0;
          TreeSet<String> sortedOptions = new TreeSet<>();
          for (int i = 0; i < exception.expectedTokenSequences.length; i++) {
              if (maxExpectedTokenSequenceLength < exception.expectedTokenSequences[i].length) {
                  maxExpectedTokenSequenceLength = exception.expectedTokenSequences[i].length;
              }
              for (int j = 0; j < exception.expectedTokenSequences[i].length; j++) {
                  sortedOptions.add(exception.tokenImage[exception.expectedTokenSequences[i][j]]);
              }
          }
  
          for (String option : sortedOptions) {
              expected.append(" ").append(option);
          }
  
          sb.append("");
  
          Token token = exception.currentToken.next;
          for (int i = 0; i < maxExpectedTokenSequenceLength; i++) {
              String tokenText = token.image;
              String escapedTokenText = ParseException.add_escapes(tokenText);
              if (i != 0) {
                  sb.append(" ");
              }
              if (token.kind == 0) {
                  sb.append(exception.tokenImage[0]);
                  break;
              }
              escapedTokenText = "\"" + escapedTokenText + "\"";
              String image = exception.tokenImage[token.kind];
              if (image.equals(escapedTokenText)) {
                  sb.append(image);
              } else {
                  sb.append(" ")
                          .append(escapedTokenText)
                          .append(" ")
                          .append(image);
              }
              token = token.next;
          }
  
          if (exception.expectedTokenSequences.length != 0) {
              int numExpectedTokens = exception.expectedTokenSequences.length;
              sb.append(", expected")
                      .append(numExpectedTokens == 1 ? "" : " one of ")
                      .append(expected.toString());
          }
          return sb.toString();
      }