Make parse() count the spaces in the regularized code string.
Refactor the space tokenizer to be its own function; parse() no longer exists.