diff options
author | Morgan Deters <mdeters@cs.nyu.edu> | 2013-07-23 11:55:39 -0400 |
---|---|---|
committer | Morgan Deters <mdeters@cs.nyu.edu> | 2013-07-23 11:55:39 -0400 |
commit | e12e7b9f980ec3f2b3db6de73e5fbe6f0daa1c00 (patch) | |
tree | b7561d0d924ad7a3d4caea3a585f4a5bfb28d2e2 /src/options/options_template.cpp | |
parent | 36b4c5c156e32d7bb8634794e8bf95b8617a3944 (diff) |
(get-info :all-options) to get option values; also command-line option suggestions
Diffstat (limited to 'src/options/options_template.cpp')
-rw-r--r-- | src/options/options_template.cpp | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/options/options_template.cpp b/src/options/options_template.cpp index 81ffe1b27..7888beec3 100644 --- a/src/options/options_template.cpp +++ b/src/options/options_template.cpp @@ -518,6 +518,48 @@ ${all_modules_option_handlers} return nonOptions; } +std::vector<std::string> Options::suggestCommandLineOptions(const std::string& optionName) throw() { + std::vector<std::string> suggestions; + + const char* opt; + for(size_t i = 0; (opt = cmdlineOptions[i].name) != NULL; ++i) { + if(std::strstr(opt, optionName.c_str()) != NULL) { + suggestions.push_back(opt); + } + } + + return suggestions; +} + +static const char* smtOptions[] = { + ${all_modules_smt_options}, +#line 547 "${template}" + NULL +};/* smtOptions[] */ + +std::vector<std::string> Options::suggestSmtOptions(const std::string& optionName) throw() { + std::vector<std::string> suggestions; + + const char* opt; + for(size_t i = 0; (opt = smtOptions[i]) != NULL; ++i) { + if(std::strstr(opt, optionName.c_str()) != NULL) { + suggestions.push_back(opt); + } + } + + return suggestions; +} + +SExpr Options::getOptions() const throw() { + std::vector<SExpr> opts; + + ${all_modules_get_options} + +#line 569 "${template}" + + return SExpr(opts); +} + #undef USE_EARLY_TYPE_CHECKING_BY_DEFAULT #undef DO_SEMANTIC_CHECKS_BY_DEFAULT |