diff options
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/getopt.cpp | 10 | ||||
-rw-r--r-- | src/main/main.cpp | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/main/getopt.cpp b/src/main/getopt.cpp index b24e91803..fda0bf766 100644 --- a/src/main/getopt.cpp +++ b/src/main/getopt.cpp @@ -62,7 +62,8 @@ enum OptionValue { PARSE_ONLY, NO_CHECKING, USE_MMAP, - SHOW_CONFIG + SHOW_CONFIG, + STRICT_PARSING };/* enum OptionValue */ /** @@ -104,7 +105,8 @@ static struct option cmdlineOptions[] = { { "about" , no_argument , NULL, 'V' }, { "lang" , required_argument, NULL, 'L' }, { "parse-only" , no_argument , NULL, PARSE_ONLY }, - { "mmap", no_argument , NULL, USE_MMAP } + { "mmap", no_argument , NULL, USE_MMAP }, + { "strict-parsing", no_argument , NULL, STRICT_PARSING }, };/* if you add things to the above, please remember to update usage.h! */ /** Full argv[0] */ @@ -210,6 +212,10 @@ throw(OptionException) { opts->memoryMap = true; break; + case STRICT_PARSING: + opts->strictParsing = true; + break; + case SHOW_CONFIG: fputs(Configuration::about().c_str(), stdout); printf("\n"); diff --git a/src/main/main.cpp b/src/main/main.cpp index 037dde559..19e1d0cff 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -165,6 +165,10 @@ int runCvc4(int argc, char* argv[]) { parser.disableChecks(); } + if( options.strictParsing ) { + parser.enableStrictMode(); + } + // Parse and execute commands until we are done Command* cmd; while((cmd = parser.nextCommand())) { |