From 4fb42ac1e5a96c1633bb4570681b09db657f673d Mon Sep 17 00:00:00 2001 From: Morgan Deters Date: Fri, 3 Oct 2014 13:22:45 -0400 Subject: [PATCH] Improve error in CVC parser in presence of unrecognized command name. --- src/parser/cvc/Cvc.g | 7 +++++++ 1 file changed, 7 insertions(+) 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] -- 2.30.2