Framework for semantic analyzer