void parse_options(const command_line_parser& parser) { using namespace mcrl2::lts; ltsinfo_base::parse_options(parser); if (0 < parser.arguments.size()) { infilename = parser.arguments[0]; } if (1 < parser.arguments.size()) { throw parser.error("too many file arguments"); } if (parser.options.count("in")) { if (1 < parser.options.count("in")) { throw parser.error("multiple input formats specified; can only use one"); } intype = mcrl2::lts::detail::parse_format(parser.option_argument("in")); if (intype == lts_none || intype == lts_dot) { throw parser.error("option -i/--in has illegal argument '" + parser.option_argument("in") + "'"); } } }
void parse_options(const command_line_parser& parser) { super::parse_options(parser); m_rewrite = (parser.options.count("no-rewrite")==0); m_sumelm = (parser.options.count("no-sumelm")==0); m_pretty = (parser.options.count("pretty")!=0); if (parser.options.count("end-phase")>0) { std::string phase = parser.option_argument("end-phase"); if (std::strncmp(phase.c_str(), "pa", 3) == 0) { m_end_phase = PH_PARSE; } else if (std::strncmp(phase.c_str(), "tc", 3) == 0) { m_end_phase = PH_TYPE_CHECK; } else { throw parser.error("option -p has illegal argument '" + phase + "'"); } } m_action_rename_filename = parser.option_argument("renamefile"); }