nlfiedler / bakeneko

Scheme R7RS interpreter in Go
BSD 3-Clause "New" or "Revised" License
2 stars 0 forks source link

Implement a REPL #7

Open nlfiedler opened 11 years ago

nlfiedler commented 11 years ago

Scheme R7RS specifies what a REPL for Scheme should do.

nlfiedler commented 11 years ago

Anything not beginning with a colon (:) is assumed to be a Scheme expression. If the input begins with a colon then it is presumed to be a REPL command. Lithp defines several such commands: :quit, :help, :load, :env.

nlfiedler commented 10 years ago

To allow multi-line input, use the lexer to tokenize the input, counting open/close parentheses. If the number of each is the same, the expression is complete and ready for evaluation.