Completed Parser and added test cases