added abstract parser class and corresponding unit tests