move ed initialization into semantic and move semantic into getVarExp.