Implement the parser's expect() function

Also start implementing parser tests.
Found a way to make this happen, PTAL