Produce error for bad indexed function names in SMT-LIB, remove antlr warning.
authorMorgan Deters <mdeters@cs.nyu.edu>
Tue, 19 Aug 2014 20:39:06 +0000 (16:39 -0400)
committerMorgan Deters <mdeters@cs.nyu.edu>
Tue, 19 Aug 2014 20:39:06 +0000 (16:39 -0400)
src/parser/smt2/Smt2.g

index 085cc11c840ca532c6acfd428bb47c2008bdbe08..e05ffaebebbbb84174d4d3e1e71edb120ee0a9ba 100644 (file)
@@ -1236,8 +1236,8 @@ badIndexedFunctionName
 @declarations {
   std::string name;
 }
-  : symbol[name,CHECK_NONE,SYM_VARIABLE] INTEGER_LITERAL+
-      { PARSER_STATE->parseError(std::string("Unknown indexed function `") + name + "'"); }
+  : id=(SIMPLE_SYMBOL | QUOTED_SYMBOL | UNTERMINATED_QUOTED_SYMBOL)
+      { PARSER_STATE->parseError(std::string("Unknown indexed function `") + AntlrInput::tokenText($id) + "'"); }
   ;
 
 /**