code to gen expr