Package org.renjin.repl

Examples of org.renjin.repl.JlineRepl


      if(options.has("e")) {
        evaluateExpression(session, (String) options.valueOf("e"));
      } else if(options.has("f")) {
        evaluateFile(session, (String) options.valueOf("f"));
      } else {
        JlineRepl repl = new JlineRepl(session);
        repl.run();
      }

    } catch (Exception e) {
      e.printStackTrace();
      System.exit(-1);
View Full Code Here


  }

  private static void evaluate(Session session, InputStream in) throws Exception {
    UnsupportedTerminal term = new UnsupportedTerminal();
    ConsoleReader consoleReader = new ConsoleReader(in, System.out, term);
    JlineRepl repl = new JlineRepl(session, consoleReader);
    repl.setEcho(true);
    repl.setStopOnError(true);

    try {
      repl.run();
    } catch(Exception e) {
      e.printStackTrace(System.err);
      System.err.println("Execution halted");
    }
  }
View Full Code Here

    }
   
    UnsupportedTerminal term = new UnsupportedTerminal();
    InputStream in = new ByteArrayInputStream(sourceText.getBytes(Charsets.UTF_8));
    ConsoleReader consoleReader = new ConsoleReader(in, reporter.getStdOut(), term);
    JlineRepl repl = new JlineRepl(session, consoleReader);
    repl.setEcho(true);
    repl.setStopOnError(true);

    try {
      repl.run();
      reporter.functionSucceeded();
   
    } catch(Throwable e) {
      reporter.functionThrew(e);
      return;
View Full Code Here

TOP

Related Classes of org.renjin.repl.JlineRepl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.