summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorChristopher L. Conway <christopherleeconway@gmail.com>2010-05-06 21:11:43 +0000
committerChristopher L. Conway <christopherleeconway@gmail.com>2010-05-06 21:11:43 +0000
commitd292e8c233305c402da65a1cf97668881f7b099c (patch)
tree995ba2c65c61c0e3a7038d1eeae95c8b9efea599 /src/main
parentf4643b0e2f5ca233dcfeb91fbb424b8caec836e6 (diff)
Adding --strict-parsing option
Diffstat (limited to 'src/main')
-rw-r--r--src/main/getopt.cpp10
-rw-r--r--src/main/main.cpp4
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())) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback