The REPL API. The REPL uses a state machine to control what methods can be applied to it.