Interactive Parsing

version 3 by Jon Ingold

  • Home page
  • Beginning
  • Previous
  • Next

  • Section 3 - Using Text IO Control to read in command in a sub-window

    Before printing the command prompt when the current text input window is the key-window:
        clear the current text input window.

    Before reading a command when the current action is restarting the game or the current action is quitting the game:
        say line break.
    After reading a command when not Inputstyling:
        shut down the echo stream of the main-window;
        say ">[player's command in upper case][command clarification break]";
        echo the stream of the main-window to the transcript.

    The command-pasting terminator is "[run paragraph on][if we are writing a transcript][echo stream of current text input window][line break][stream of current text input window][end if]".