code: private void appendQuerySnippet(Parser parser, StringBuilder builder)
      {
          TokenStream tokenStream = parser.getTokenStream();
          int index = tokenStream.index();
          int size = tokenStream.size();
  
          Token from = tokenStream.get(getSnippetFirstTokenIndex(index));
          Token to = tokenStream.get(getSnippetLastTokenIndex(index, size));
          Token offending = tokenStream.get(getOffendingTokenIndex(index, size));
  
          appendSnippet(builder, from, to, offending);
      }
docs: Appends a query snippet to the message to help the user to understand the problem.
  
  @param parser the parser used to parse the query
  @param builder the <code>StringBuilder</code> used to build the error message