String getStatement(int startPosition, short[] startTokens) { int semiPosition = 0; while (true) { if (token.tokenType == Tokens.SEMICOLON) { semiPosition = scanner.getPosition(); } else if (token.tokenType == Tokens.X_ENDPARSE) { if (semiPosition == 0) { break; } else { rewind(semiPosition); break; } } else { semiPosition = 0; if (ArrayUtil.find(startTokens, token.tokenType) != -1) { break; } } read(); } String sql = scanner.getPart(startPosition, scanner.getPosition()); return sql; }
String getLastPart(int position) { return scanner.getPart(position, scanner.getTokenPosition()); }
String getLastPartAndCurrent(int position) { return scanner.getPart(position, scanner.getPosition()); }
String getLastPart() { return scanner.getPart(parsePosition, scanner.getTokenPosition()); }