diff options
author | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-04-28 18:34:11 +0000 |
---|---|---|
committer | Christopher L. Conway <christopherleeconway@gmail.com> | 2010-04-28 18:34:11 +0000 |
commit | a72c7a26fda2b9c268912e618fd7d71164e4800a (patch) | |
tree | e1694867f049b5328720abc9496cfe926989aae7 /src/main/main.cpp | |
parent | 7a8454030fdbb1e6c2a6db7ce18eafe0764eaf4a (diff) |
Refactoring Input/Parser code to support external manipulation of the parser state.
Diffstat (limited to 'src/main/main.cpp')
-rw-r--r-- | src/main/main.cpp | 10 |
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); } |