From: Morgan Deters Date: Fri, 3 Oct 2014 17:22:45 +0000 (-0400) Subject: Improve error in CVC parser in presence of unrecognized command name. X-Git-Tag: cvc5-1.0.0~6509^2~17 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4fb42ac1e5a96c1633bb4570681b09db657f673d;p=cvc5.git Improve error in CVC parser in presence of unrecognized command name. --- diff --git a/src/parser/cvc/Cvc.g b/src/parser/cvc/Cvc.g index 0a440f299..347759c9a 100644 --- a/src/parser/cvc/Cvc.g +++ b/src/parser/cvc/Cvc.g @@ -635,6 +635,13 @@ command returns [CVC4::Command* cmd = NULL] cmd = new EmptyCommand(); } } + | IDENTIFIER SEMICOLON + { std::stringstream ss; + ss << "Unrecognized command `" + << AntlrInput::tokenText($IDENTIFIER) + << "'"; + PARSER_STATE->parseError(ss.str()); + } ; typeOrVarLetDecl[CVC4::parser::DeclarationCheck check]