Jim's
Tutorials

Spring 2019
course
site

Nick Says

I've started following along with the Make a Lisp guide. I've decided to implement the Lisp in javascript to give myself a refresher. Currently, I am on step 1, which involves designing the lexer and parser for the REPL. More specifically, I am working on the lexer. The Make a Lisp guide has particular instructions regarding how to implement this step...I just have to finish up the reader functions so that I can test them. Right now, I have a prompt that accepts user input then just spits it back out, in place of any parsing.

user> hello
hello
user> helloooooo!!!
helloooooo!!!
user> is anybody there?????
is anybody there?????
user> stop taunting me!
stop taunting me!
user> ^D
hypatia@Yours-MacBook-Air:mal/javascript$ 

Jim says

reading and echoing a line in node is a PITA. See attached. (Their javascript example has entire library files for read & print ...)

https://cs.marlboro.college /cours /spring2019 /jims_tutorials /ncreel /apr18
last modified Mon November 25 2024 12:28 pm

attachments [paper clip]

  last modified size
TXT jim_step0_repl.js Mon Nov 25 2024 12:28 pm 1.1K
TXT reader.js Mon Nov 25 2024 12:28 pm 1.1K
TXT step1_read_print.js Mon Nov 25 2024 12:28 pm 683B