Implement the parser's expect() function

Also start implementing parser tests.
I put him up to this. Looking back, I have to agree that this way of writing test cases invites test case bugs. I reckon the lexer likely won't break anytime soon, and as long as we craft the parser tests to be easily lexable (i.e. not filled with obscure edge cases), we should be fine.