Assert(isDeclared(name));
}
+void
+AntlrParser::undefineVar(const std::string& name) {
+ Assert(isDeclared(name));
+ d_varSymbolTable.unbindName(name);
+ Assert(!isDeclared(name));
+}
+
+
const Type*
AntlrParser::newSort(const std::string& name) {
Debug("parser") << "newSort(" << name << ")" << std::endl;
/** Create a new variable definition (e.g., from a let binding). */
void defineVar(const std::string& name, const Expr& val);
+ /** Remove a variable definition (e.g., from a let binding). */
+ void undefineVar(const std::string& name);
/** Returns a function type over the given domain and range types. */
const Type* functionType(const Type* domain, const Type* range);
LPAREN LET LPAREN name=variable[CHECK_UNDECLARED] expr1=annotatedFormula RPAREN
{ defineVar(name,expr1); }
formula=annotatedFormula
+ { undefineVar(name); }
RPAREN
| /* An flet binding */
LPAREN FLET LPAREN name=function_var[CHECK_UNDECLARED] expr1=annotatedFormula RPAREN
{ defineVar(name,expr1); }
formula=annotatedFormula
+ { undefineVar(name); }
RPAREN
| /* A non-built-in function application */