summaryrefslogtreecommitdiff
path: root/src/parser/input.cpp
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2010-04-04 23:03:52 +0000
committerMorgan Deters <mdeters@gmail.com>2010-04-04 23:03:52 +0000
commitff53861016427723a7c29e9bbca6f497b4556164 (patch)
tree4ed798e2f7dfa31283f7d14d44e70c77badf6b75 /src/parser/input.cpp
parent42c58baf0a2a96c1f3bd797d64834d02adfb9a59 (diff)
* Addressed issues brought up in Chris's review of Morgan's
NodeManager (bug #65). Better documentation, etc. * As part of this, removed NodeManager::mkVar() (which created a variable of unknown type). This requires changes to lots of unit tests, which were using this function. * Performed some review of parser code (my code review #73). + I changed the way exceptions were caught and rethrown in src/parser/input.cpp. + ParserExceptions weren't being properly constructed (d_line and d_column weren't intiialized and could contain junk, leading to weird error messages). Fixed. * Fix to the current working directory used by run_regression script. Makes exceptional output easier to match against (in expected error output). * (configure.ac) Ensure that CFLAGS has -fexceptions in it, in case we compile any C code and don't use the C++ compiler.
Diffstat (limited to 'src/parser/input.cpp')
-rw-r--r--src/parser/input.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parser/input.cpp b/src/parser/input.cpp
index 4d5f348d8..fd1a4cbd6 100644
--- a/src/parser/input.cpp
+++ b/src/parser/input.cpp
@@ -43,7 +43,7 @@ void Input::enableChecks() {
d_parserState->enableChecks();
}
-Command* Input::parseNextCommand() throw (ParserException) {
+Command* Input::parseNextCommand() throw(ParserException) {
Debug("parser") << "parseNextCommand()" << std::endl;
Command* cmd = NULL;
if(!done()) {
@@ -54,14 +54,14 @@ Command* Input::parseNextCommand() throw (ParserException) {
}
} catch(ParserException& e) {
d_parserState->setDone();
- throw ParserException(e.toString());
+ throw;
}
}
Debug("parser") << "parseNextCommand() => " << cmd << std::endl;
return cmd;
}
-Expr Input::parseNextExpression() throw (ParserException) {
+Expr Input::parseNextExpression() throw(ParserException) {
Debug("parser") << "parseNextExpression()" << std::endl;
Expr result;
if(!done()) {
@@ -71,7 +71,7 @@ Expr Input::parseNextExpression() throw (ParserException) {
d_parserState->setDone();
} catch(ParserException& e) {
d_parserState->setDone();
- throw ParserException(e.toString());
+ throw;
}
}
Debug("parser") << "parseNextExpression() => " << result << std::endl;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback