Better error when there are \backslashes in |quoted symbols|.
authorMorgan Deters <mdeters@cs.nyu.edu>
Sun, 8 Jun 2014 21:55:23 +0000 (17:55 -0400)
committerMorgan Deters <mdeters@cs.nyu.edu>
Sun, 8 Jun 2014 21:55:23 +0000 (17:55 -0400)
src/parser/smt2/Smt2.g

index 39f7462447587b8d3c41758cc1a6b0e7c2517328..8fa047885973ffc805ef989087eee8529c71c6e3 100644 (file)
@@ -1551,8 +1551,12 @@ symbol[std::string& id,
         PARSER_STATE->checkDeclaration(id, check, type);
       }
     }
-  | UNTERMINATED_QUOTED_SYMBOL EOF
-    { PARSER_STATE->unexpectedEOF("unterminated |quoted| symbol"); }
+  | UNTERMINATED_QUOTED_SYMBOL
+    ( EOF
+      { PARSER_STATE->unexpectedEOF("unterminated |quoted| symbol"); }
+    | '\\'
+      { PARSER_STATE->unexpectedEOF("backslash not permitted in |quoted| symbol"); }
+    )
   ;
 
 /**