From: Morgan Deters Date: Mon, 5 Apr 2010 00:05:47 +0000 (+0000) Subject: minor formatting and code guidelines, related to parser code review (bug #73) X-Git-Tag: cvc5-1.0.0~9137 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=484dc0c61b86e49f81d82ef398f0148923c862a0;p=cvc5.git minor formatting and code guidelines, related to parser code review (bug #73) --- diff --git a/src/parser/input.h b/src/parser/input.h index 0e924364d..f109036ed 100644 --- a/src/parser/input.h +++ b/src/parser/input.h @@ -95,16 +95,19 @@ public: static Input* newStringInput(ExprManager* exprManager, InputLanguage lang, const std::string& input, const std::string& name); /** - * Check if we are done -- either the end of input has been reached, or some - * error has been encountered. - * @return true if parser is done - */ + * Check if we are done -- either the end of input has been reached, or some + * error has been encountered. + * @return true if parser is done + */ bool done() const; /** Enable semantic checks during parsing. */ void enableChecks(); - /** Disable semantic checks during parsing. Disabling checks may lead to crashes on bad inputs. */ + /** + * Disable semantic checks during parsing. Disabling checks may lead + * to crashes on bad inputs. + */ void disableChecks(); /** diff --git a/src/parser/parser_state.h b/src/parser/parser_state.h index 3130e1f46..07f85623c 100644 --- a/src/parser/parser_state.h +++ b/src/parser/parser_state.h @@ -13,8 +13,10 @@ ** A collection of state for use by parser implementations. **/ -#ifndef __CVC4__PARSER__PARSER_STATE_H_ -#define __CVC4__PARSER__PARSER_STATE_H_ +#include "cvc4parser_private.h" + +#ifndef __CVC4__PARSER__PARSER_STATE_H +#define __CVC4__PARSER__PARSER_STATE_H #include @@ -255,4 +257,4 @@ public: } // namespace CVC4 -#endif /* __CVC4__PARSER__PARSER_STATE_H_ */ +#endif /* __CVC4__PARSER__PARSER_STATE_H */ diff --git a/test/unit/parser/parser_white.h b/test/unit/parser/parser_white.h index f4d104a93..270061c29 100644 --- a/test/unit/parser/parser_white.h +++ b/test/unit/parser/parser_white.h @@ -10,7 +10,7 @@ ** See the file COPYING in the top-level source directory for licensing ** information. ** - ** Black box testing of CVC4::parser::SmtParser. + ** White box testing of CVC4::parser::SmtParser. **/ #include @@ -139,7 +139,7 @@ const string badSmtExprs[] = { const int numBadSmtExprs = sizeof(badSmtExprs) / sizeof(string); -class ParserBlack : public CxxTest::TestSuite { +class ParserWhite : public CxxTest::TestSuite { ExprManager *d_exprManager; /* Set up declaration context for expr inputs */ @@ -227,7 +227,7 @@ class ParserBlack : public CxxTest::TestSuite { } catch (Exception& e) { cout << "\nGood expr failed:\n" << goodBooleanExprs[i] << endl; cout << e; - throw e; + throw; } } }