decoupling parser from semantic analyzer