/** * Combines the parser positions of an array of nodes to create a position * which spans from the beginning of the first to the end of the last. */ public static SqlParserPos sum( SqlNode[] nodes) { return sum(nodes, Integer.MAX_VALUE, Integer.MAX_VALUE, -1, -1); }
/** * Combines an array of parser positions to create a position which spans * from the beginning of the first to the end of the last. */ public static SqlParserPos sum( SqlParserPos[] poses) { return sum(poses, Integer.MAX_VALUE, Integer.MAX_VALUE, -1, -1); }
/** * Combines an array of parser positions to create a position which spans * from the beginning of the first to the end of the last. */ public static SqlParserPos sum( SqlParserPos [] poses) { return sum(poses, Integer.MAX_VALUE, Integer.MAX_VALUE, -1, -1); }
/** * Combines the parser positions of an array of nodes to create a position * which spans from the beginning of the first to the end of the last. */ public static SqlParserPos sum( SqlNode [] nodes) { return sum(nodes, Integer.MAX_VALUE, Integer.MAX_VALUE, -1, -1); }
/** * Combines the parser positions of a list of nodes to create a position * which spans from the beginning of the first to the end of the last. */ public static SqlParserPos sum(List<SqlNode> nodes) { return sum(nodes.toArray(new SqlNode[nodes.size()])); }
/** * Combines the parser positions of a list of nodes to create a position * which spans from the beginning of the first to the end of the last. */ public static SqlParserPos sum(List<? extends SqlNode> nodes) { return sum(nodes.toArray(new SqlNode[nodes.size()])); }
/** * Parses a compound identifier. */ final public SqlIdentifier CompoundIdentifier() throws ParseException { List<String> list = new ArrayList<String>(); List<SqlParserPos> posList = new ArrayList<SqlParserPos>(); String p; p = Identifier(); posList.add(getPos()); list.add(p); label_19: while (true) { if (jj_2_273(2)) { ; } else { break label_19; } jj_consume_token(DOT); p = Identifier(); list.add(p); posList.add(getPos()); } SqlParserPos[] componentPositions = (SqlParserPos []) posList.toArray( new SqlParserPos[posList.size()]); SqlParserPos pos = SqlParserPos.sum(componentPositions); {if (true) return new SqlIdentifier(list, null, pos, posList);} throw new Error("Missing return statement in function"); }
(SqlParserPos []) posList.toArray( new SqlParserPos[posList.size()]); SqlParserPos pos = SqlParserPos.sum(componentPositions); {if (true) return new SqlIdentifier( SqlParserUtil.toStringArray(list), null, pos, componentPositions);}
/** * Combines this parser position with an array of positions to create a * position which spans from the first point in the first to the last point * in the other. */ public SqlParserPos plusAll(SqlNode[] nodes) { int line = getLineNum(); int column = getColumnNum(); int endLine = getEndLineNum(); int endColumn = getEndColumnNum(); return sum(nodes, line, column, endLine, endColumn); }
/** * Combines this parser position with an array of positions to create a * position which spans from the first point in the first to the last point * in the other. */ public SqlParserPos plusAll(SqlNode [] nodes) { int line = getLineNum(); int column = getColumnNum(); int endLine = getEndLineNum(); int endColumn = getEndColumnNum(); return sum(nodes, line, column, endLine, endColumn); }
{if (true) return frags.get(0);} // just the head fragment } else { SqlParserPos pos2 = SqlParserPos.sum(frags); {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, frags);} unicodeEscapeChar); SqlParserPos pos2 = SqlParserPos.sum(rands); {if (true) return SqlStdOperatorTable.LITERAL_CHAIN.createCall(pos2, rands);}
{if (true) return (SqlLiteral) frags.get(0);} // just the head fragment } else { SqlParserPos pos2 = SqlParserPos.sum(frags); {if (true) return SqlStdOperatorTable.literalChainOperator.createCall( pos2, frags);} unicodeEscapeChar); SqlParserPos pos2 = SqlParserPos.sum(rands); {if (true) return SqlStdOperatorTable.literalChainOperator.createCall( pos2, rands);}