Partial implemntation of parser.cpp