From: Morgan Deters Date: Mon, 16 Dec 2013 14:49:05 +0000 (-0500) Subject: Better get-value parse error message for common user error. X-Git-Tag: cvc5-1.0.0~6987^2~20 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f42dcea977ed9180481cc842531e2c5372acbbe1;p=cvc5.git Better get-value parse error message for common user error. --- diff --git a/src/parser/smt2/Smt2.g b/src/parser/smt2/Smt2.g index e2e52b158..13850aba6 100644 --- a/src/parser/smt2/Smt2.g +++ b/src/parser/smt2/Smt2.g @@ -336,8 +336,10 @@ command returns [CVC4::Command* cmd = NULL] } | /* value query */ GET_VALUE_TOK { PARSER_STATE->checkThatLogicIsSet(); } - LPAREN_TOK termList[terms,expr] RPAREN_TOK - { $cmd = new GetValueCommand(terms); } + ( LPAREN_TOK termList[terms,expr] RPAREN_TOK + { $cmd = new GetValueCommand(terms); } + | term[expr, expr2] + { PARSER_STATE->parseError("The get-value command expects a list of terms. Perhaps you forgot a pair of parentheses?"); } ) | /* get-assignment */ GET_ASSIGNMENT_TOK { PARSER_STATE->checkThatLogicIsSet(); } { cmd = new GetAssignmentCommand(); }