kiama.util

trait REPL

[source: kiama/util/REPL.scala]

trait REPL
extends AnyRef
General support for applications that implement read-eval-print loops (REPLs).
Direct Known Subclasses:
ParsingREPL, GeneratingREPL

Method Summary
def main (args : scala.Array[java.lang.String]) : Unit
Read lines from standard input and pass non-null ones to processline. Continue until processline returns false. The command-line arguments are ignored. Calls setup before entering the loop and prompt each time input is about to be read.
abstract def processline (line : java.lang.String) : Unit
Process a user input line.
def prompt : java.lang.String
Define the prompt (default: "> ").
def setup : Unit
Carry out setup processing for the REPL. Default: do nothing.
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
def main(args : scala.Array[java.lang.String]) : Unit
Read lines from standard input and pass non-null ones to processline. Continue until processline returns false. The command-line arguments are ignored. Calls setup before entering the loop and prompt each time input is about to be read.

def setup : Unit
Carry out setup processing for the REPL. Default: do nothing.

def prompt : java.lang.String
Define the prompt (default: "> ").

abstract def processline(line : java.lang.String) : Unit
Process a user input line.