Extend the scanner with a convenient interface for parsing.

This peek/read interface, along with utility functions for common
situations, should make it easier to hand-write a recursive descent
parser.