Added contracts for parser methods.