public static String generateErrorMessage(ASTNode ast, String message) { StringBuilder sb = new StringBuilder(); if (ast == null) { sb.append(message).append(". Cannot tell the position of null AST."); return sb.toString(); } sb.append(ast.getLine()); sb.append(":"); sb.append(ast.getCharPositionInLine()); sb.append(" "); sb.append(message); sb.append(". Error encountered near token '"); sb.append(ErrorMsg.getText(ast)); sb.append("'"); return sb.toString(); }
public static String generateErrorMessage(ASTNode ast, String message) { StringBuilder sb = new StringBuilder(); if (ast == null) { sb.append(message).append(". Cannot tell the position of null AST."); return sb.toString(); } sb.append(ast.getLine()); sb.append(":"); sb.append(ast.getCharPositionInLine()); sb.append(" "); sb.append(message); sb.append(". Error encountered near token '"); sb.append(ErrorMsg.getText(ast)); sb.append("'"); return sb.toString(); }
StorageFormat storageFormat = new StorageFormat(conf); LOG.info("Creating table " + dbDotTab + " position=" + ast.getCharPositionInLine()); int numCh = ast.getChildCount();
StorageFormat storageFormat = new StorageFormat(conf); LOG.info("Creating table " + dbDotTab + " position=" + ast.getCharPositionInLine()); int numCh = ast.getChildCount();
+ ast.getCharPositionInLine()); int numCh = ast.getChildCount(); for (int num = 1; num < numCh; num++) {
+ ast.getCharPositionInLine()); int numCh = ast.getChildCount(); for (int num = 1; num < numCh; num++) {
public static String generateErrorMessage(ASTNode ast, String message) { StringBuilder sb = new StringBuilder(); if (ast == null) { sb.append(message).append(". Cannot tell the position of null AST."); return sb.toString(); } sb.append(ast.getLine()); sb.append(":"); sb.append(ast.getCharPositionInLine()); sb.append(" "); sb.append(message); sb.append(". Error encountered near token '"); sb.append(ErrorMsg.getText(ast)); sb.append("'"); return sb.toString(); }
System.out.print(" (l" + level + "c" + child + "p" + node.getCharPositionInLine() + ")");
System.out.print(" (l" + level + "c" + child + "p" + node.getCharPositionInLine() + ")");
ASTNode parent = (ASTNode) ast.getParent(); if (isCubeKeywordNode((ASTNode) ast.getChild(0))) { cqi.startPos = ast.getCharPositionInLine(); } else { ASTNode selectAST = (ASTNode) ast.getChild(1).getChild(1); cqi.startPos = getStartPos(originalQuery, HQLParser.leftMostChild(selectAST).getCharPositionInLine(), "select");
+ ast.getCharPositionInLine()); int numCh = ast.getChildCount(); for (int num = 1; num < numCh; num++) {
+ ast.getCharPositionInLine()); int numCh = ast.getChildCount();
+ ast.getCharPositionInLine()); int numCh = ast.getChildCount();
+ ast.getCharPositionInLine()); int numCh = ast.getChildCount(); for (int num = 1; num < numCh; num++) {