{
sCommand = null;
}
Reader reader = (sCommand != null) ? new StringReader(sCommand) : m_reader;
Parser parser = getParser();
String sStartupMessage;
setReader(reader);
try
{
sStartupMessage = startup();
}
catch (nexj.core.tools.GenericREPL.LoginException t)
{
Throwable cause = t.getCause();
setExitCode(EXIT_LOGIN);
if (!m_bQuiet)
{
m_writer.write("; Login error: " + cause.getMessage());
m_writer.write(SysUtil.LINE_SEP);
m_writer.flush();
}
s_logger.info("Login error", cause);
return;
}
if (sCommand == null && !m_bQuiet)
{
m_writer.write("; NexJ Scheme");
m_writer.write(SysUtil.LINE_SEP);
if (sStartupMessage != null)
{
m_writer.write("; " + sStartupMessage);
m_writer.write(SysUtil.LINE_SEP);
}
m_writer.flush();
}
for (;;)
{
if (sCommand == null && !m_bQuiet)
{
m_writer.write(SysUtil.LINE_SEP);
m_writer.write("> ");
m_writer.flush();
}
try
{
Object expr = parser.parse(reader, null);
if (expr == Parser.EOF)
{
break;
}