presto-parser/src/main/java/io/prestosql/sql/parser/ErrorHandler.java/ParsingState/toString
class ParsingState:        @Override
        public String toString()
        {
            Token token = parser.getTokenStream().get(tokenIndex);

            String text = firstNonNull(token.getText(), "?");
            if (text != null) {
                text = text.replace("\\", "\\\\");
                text = text.replace("\n", "\\n");
                text = text.replace("\r", "\\r");
                text = text.replace("\t", "\\t");
            }

            return format(
                    "%s%s:%s @ %s:<%s>:%s",
                    suppressed ? "-" : "+",
                    parser.getRuleNames()[state.ruleIndex],
                    state.stateNumber,
                    tokenIndex,
                    parser.getVocabulary().getSymbolicName(token.getType()),
                    text);
        }