Scanner that reads characters and outputs tokens.