... yes, it can be done in Pascal, likely interpreted Pascal.
Pascalscript is used in the Lazarus ide and is readily available and capable to implement REPL.
It takes some work from your side to implement the interactive part of REPL, but not much and nothing fancy.
( meaning a beginner that knows about a button, memo's and edit's can implement it...)
Maybe a simple working example from MaXbox
I also found “writing interpreter in object pascal” by Herbert Sauro. He builds repl in Pascal for his computer language. Would be interesting to dig Mystic Pascal as well, I think it dates to early 80’s. There is a diskette for sale on ebay. Thank you for good pointers, fellas.