implemented recursive descent parser for new grammar