while ((extendedLine = reader.readLine(getPrompt(queryStr))) != null) {
if (isEndOfCommand(extendedLine)) {
queryStr.append(" " + extendedLine);
long start = System.currentTimeMillis();
Parser parser = new Parser(queryStr.toString(), out, tff.get());
ReturnMsg rs = null;
try {
Command cmd = parser.terminatedCommand();
if (cmd != null) {
rs = cmd.execute(conf);
}
} catch (ParseException pe) {
String[] msg = pe.getMessage().split("[\n]");
System.out.println("Syntax error : Type 'help;' for usage.\nMessage : " + msg[0]);
} catch (TokenMgrError te) {
String[] msg = te.getMessage().split("[\n]");
System.out.println("Lexical error : Type 'help;' for usage.\nMessage : " + msg[0]);
}
long end = System.currentTimeMillis();
if (rs != null && rs.getType() > -1)
System.out.println(rs.getMsg()
+ executeTime((rs.getType() == 1), start, end));
queryStr = new StringBuilder();
} else {
queryStr.append(" " + extendedLine);
}
}