I am creating an interpreter for my esolang, and I need the user to enter some text which then will be interpreted as an INTERCAL program. I want the user to enter text, which may contain any character including newlines, until the user presses ^X (Ctrl-X), like this:
Enter your code followed by ^X:
Bla
Blablabla
Bla^X
Thank you for entering your code
(line 2, 3 and 4 were entered by the user)
can anyone explain me how I can read input including newlines till the user enters ^X? Thanks