summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2010-04-05 00:05:47 +0000
committerMorgan Deters <mdeters@gmail.com>2010-04-05 00:05:47 +0000
commit484dc0c61b86e49f81d82ef398f0148923c862a0 (patch)
tree9617a546a197567e0bde6cc1f046b1d0016df94f
parentff53861016427723a7c29e9bbca6f497b4556164 (diff)
minor formatting and code guidelines, related to parser code review (bug #73)
-rw-r--r--src/parser/input.h13
-rw-r--r--src/parser/parser_state.h8
-rw-r--r--test/unit/parser/parser_white.h6
3 files changed, 16 insertions, 11 deletions
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 <string>
@@ -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 <cxxtest/TestSuite.h>
@@ -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;
}
}
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback