Simplify the scanner.

Rather than reimplementing `getline()`, just let the scanner read lines. To
keep the display of the prompt character, add an EOF token matching `\n` and
then use it.