Input/Output

Scanning Tokens

A token is a string containing no white space characters (space, tab, newline).

A scanner allows programmers to extract and examine tokens from a source string one at a time.

The source string can be internal to the program or it can be from a file.

If a token represents a number or boolean, a scanner can convert it to the number or boolean that it represents.

See parse.java

A basic console

A console is a simple loop that repeatedly:

1. prints a prompt

2. reads a command

3. quits if the command is the "quit" command

4. executes the command

5. displays the result

See Console.java