Rewrite the parser to treat whitespace more uniformly

Move the handling of whitespace from the lexer to the parser.
Merge pull request #3 from lpw25/master

Rewrite the parser to treat whitespace more uniformly