summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorChristopher L. Conway <christopherleeconway@gmail.com>2010-04-28 18:34:11 +0000
committerChristopher L. Conway <christopherleeconway@gmail.com>2010-04-28 18:34:11 +0000
commita72c7a26fda2b9c268912e618fd7d71164e4800a (patch)
treee1694867f049b5328720abc9496cfe926989aae7 /src/main
parent7a8454030fdbb1e6c2a6db7ce18eafe0764eaf4a (diff)
Refactoring Input/Parser code to support external manipulation of the parser state.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/main.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp
index 819f7695e..bdf4f882b 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -23,6 +23,7 @@
#include "main.h"
#include "usage.h"
#include "parser/input.h"
+#include "parser/parser.h"
#include "expr/expr_manager.h"
#include "smt/smt_engine.h"
#include "expr/command.h"
@@ -152,17 +153,18 @@ int runCvc4(int argc, char* argv[]) {
// if(inputFromStdin) {
// parser = Parser::getNewParser(&exprMgr, options.lang, cin, "<stdin>");
// } else {
- input = Input::newFileInput(&exprMgr, options.lang, argv[firstArgIndex],
- options.memoryMap);
+ input = Input::newFileInput(options.lang, argv[firstArgIndex],
+ options.memoryMap);
// }
+ Parser parser(&exprMgr, input);
if(!options.semanticChecks) {
- input->disableChecks();
+ parser.disableChecks();
}
// Parse and execute commands until we are done
Command* cmd;
- while((cmd = input->parseNextCommand())) {
+ while((cmd = parser.nextCommand())) {
if( !options.parseOnly ) {
doCommand(smt, cmd);
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback