void ErrorHandler::operator() (int errcode, const std::string &msg) { lock_guard guard (err_mutex); switch (errcode & 0xffff0000) { case EH_INFO : if (verbosity() >= VERBOSE) fprintf (stdout, "INFO: %s\n", msg.c_str()); break; case EH_WARNING : if (verbosity() >= NORMAL) fprintf (stderr, "WARNING: %s\n", msg.c_str()); break; case EH_ERROR : fprintf (stderr, "ERROR: %s\n", msg.c_str()); break; case EH_SEVERE : fprintf (stderr, "SEVERE ERROR: %s\n", msg.c_str()); break; case EH_DEBUG : #ifdef NDEBUG break; #endif default : if (verbosity() > QUIET) fprintf (stdout, "%s", msg.c_str()); break; } fflush (stdout); fflush (stderr); }
/** * Returns a string with the telescope's protocol version. * @param args should be an empty string or null pointer included just for prototype compatibility. * @returns A string with the simulated telescope's protocol version. */ char* get_version(char *args){ char *versionRes; versionRes=(char *)malloc(3*sizeof(char)); verbosity("version: %d.%d\n", nexstar.version.major, nexstar.version.minor); sprintf(versionRes,"%c%c#",nexstar.version.major, nexstar.version.minor); return versionRes; }
/** * Returns a string with the simulated position with AZM/ALT coordinates. * @param args should be an empty string or null pointer included just for prototype compatibility. * @returns A string with the correspondig coordinates. */ char* get_azm_alt(char *args){ char *res; res = (char *)malloc(sizeof(char)*10); sprintf(res,"%04X,%04X#",nexstar.azimuthRevolutions, nexstar.altitudeRevolutions); verbosity("Get AZM/ALT: %04X, %04X\n",nexstar.azimuthRevolutions, nexstar.altitudeRevolutions); return res; }
/** * Tells whether the telescope is moving or not. * @param args should be an empty string or null pointer included just for prototype compatibility. * @returns A string with the correspondig answer. */ char* goto_in_progress(char *args){ char *response; response = (char *)malloc(sizeof(char)*2); verbosity("gotoStatus: %d\n",nexstar.gotoStatus); sprintf(response,"%d#",nexstar.gotoStatus); return response; }
/** * Tells whether the telescope has completed its alignment or not . * @param args should be an empty string or null pointer included just for prototype compatibility. * @returns A string with the correspondig answer. */ char* alignment_complete(char *args){ char *res; res = (char *)malloc(sizeof(char)*2); sprintf(res,"%c#",nexstar.alignmentStatus); verbosity("aligmentComplete: %d\n",nexstar.alignmentStatus); return res; }
void ErrorHandler::vMessage (const char *format, va_list argptr) { if (verbosity() > QUIET) { std::string msg = Strutil::vformat (format, argptr); (*this) (EH_MESSAGE, msg); } }
void ErrorHandler::info (const char *format, ...) { if (verbosity() >= VERBOSE) { va_list argptr; va_start (argptr, format); vInfo (format, argptr); va_end (argptr); } }
/** * Echo function. Replies with the received message. * @param args any message string. * @returns The echo response. */ char* echo(char *args){ char *returnString; returnString = (char *)malloc(2*sizeof(char)); returnString[0]=args[0]; returnString[1]='#'; verbosity("echo: %c\n",args[0]); return returnString; }
void ErrorHandler::warning (const char *format, ...) { if (verbosity() >= NORMAL) { va_list argptr; va_start (argptr, format); vWarning (format, argptr); va_end (argptr); } }
void ErrorHandler::debug (const char *format, ...) { if (verbosity() > QUIET) { va_list argptr; va_start (argptr, format); vDebug (format, argptr); va_end (argptr); } }
//******************************************* const EMatrix& Recpack::LengthPropagator::FsMatrix(const State& state, const Surface& surface, double length) { //******************************************* _Fs = dx_ds(state,length) * intersector().ds_dx0(state,surface,length); if (verbosity(VVERBOSE)){ std::cout << " LengthPropagator::FsMatrix(). Fs = " << std::endl; std::cout << _Fs << std::endl; } return _Fs; }
void log(int level, const char *msg, va_list va) { static int vlevel = verbosity(); static const char *levelid[] = { "EE", "WW", "NN", "II", "DD" }; if (level <= vlevel) { if (level == CAPTURY_LOG_ERROR) ++errorCount; fprintf(stderr, "%s CAPTURY(%s) ", getTimeStamp(), levelid[level]); vfprintf(stderr, msg, va); fprintf(stderr, "\n"); fflush(stderr); } }
file_logger::file_logger(const char *file, log_level level) { verbosity(level); auto formatter = blackhole::utils::make_unique<blackhole::formatter::string_t>(format()); formatter->set_mapper(file_logger::mapping()); auto sink = blackhole::utils::make_unique<elliptics_file_t>(elliptics_file_t::config_type(file)); auto frontend = blackhole::utils::make_unique <blackhole::frontend_t<blackhole::formatter::string_t, elliptics_file_t>> (std::move(formatter), std::move(sink)); add_frontend(std::move(frontend)); add_attribute(keyword::request_id() = 0); }
void AMRLevelPluto::defineParams(const Real& a_cfl, const Real& a_domainLength, const int& a_verbosity, const Real& a_refineThresh, const int& a_tagBufferSize, const Real& a_initialDtMultiplier, const PatchPluto* const a_patchPluto) { // Store the CFL number m_cfl = a_cfl; // Store the physical dimension of the longest side of the domain m_domainLength = a_domainLength; // Store the verbosity of the object verbosity(a_verbosity); // Store the refinement threshold for gradient m_refineThresh = a_refineThresh; // Store the tag buffer size m_tagBufferSize = a_tagBufferSize; // Store the initial dt multiplier initialDtMultiplier(a_initialDtMultiplier); // Delete any existing patch factory object // (Factory has to be kept for the Patch integrator in LevelPluto ... // ... go figure ...) if (m_patchPlutoFactory != NULL) { delete m_patchPlutoFactory; } m_patchPlutoFactory = a_patchPluto->new_patchPluto(); // Delete any existing patch object if (m_patchPlutoFactory != NULL) { delete m_patchPluto; } m_patchPluto = a_patchPluto->new_patchPluto(); m_paramsDefined = true; }
Stage& SortKernel::makeReader(Options readerOptions) { if (isDebug()) { readerOptions.add<bool>("debug", true); uint32_t verbosity(getVerboseLevel()); if (!verbosity) verbosity = 1; readerOptions.add<uint32_t>("verbose", verbosity); readerOptions.add<std::string>("log", "STDERR"); } Stage& stage = Kernel::makeReader(m_inputFile); stage.setOptions(readerOptions); return stage; }
std::unique_ptr<Stage> SmoothKernel::makeReader(Options readerOptions) { if (isDebug()) { readerOptions.add("debug", true); uint32_t verbosity(getVerboseLevel()); if (!verbosity) verbosity = 1; readerOptions.add("verbose", verbosity); readerOptions.add("log", "STDERR"); } Stage* stage = KernelSupport::makeReader(m_inputFile); stage->setOptions(readerOptions); std::unique_ptr<Stage> reader_stage(stage); return reader_stage; }
std::unique_ptr<Stage> Ground::makeReader(Options readerOptions) { if (isDebug()) { readerOptions.add<bool>("debug", true); boost::uint32_t verbosity(getVerboseLevel()); if (!verbosity) verbosity = 1; readerOptions.add<boost::uint32_t>("verbose", verbosity); readerOptions.add<std::string>("log", "STDERR"); } Stage* stage = AppSupport::makeReader(m_inputFile); stage->setOptions(readerOptions); std::unique_ptr<Stage> reader_stage(stage); return reader_stage; }
Stage* Random::makeReader(Options readerOptions) { if (isDebug()) { readerOptions.add<bool>("debug", true); boost::uint32_t verbosity(getVerboseLevel()); if (!verbosity) verbosity = 1; readerOptions.add<boost::uint32_t>("verbose", verbosity); readerOptions.add<std::string>("log", "STDERR"); } StageFactory factory; Stage* reader_stage = factory.createReader("readers.faux"); reader_stage->setOptions(readerOptions); return reader_stage; }
//******************************************* const EMatrix& Recpack::LengthPropagator::transport_matrix(const State& state, double length) { //******************************************* _F = F1Matrix(state,length); if (_status["via_surface"]) _F += FsMatrix(state,*_surface, length); if (verbosity(VERBOSE)){ std::cout << " LengthPropagator::transport_matrix(). F matrix = " << std::endl; std::cout << _F << std::endl; } // TODO for (int i=0;i<_F.num_row();i++) for (int j=0;j<_F.num_row();j++) if (fabs(_F[i][j]) < 1e-10) _F[i][j] = 0; return _F; }
void SvnJobBase::outputMessage(const QString& message) { if (!model()) return; if (verbosity() == KDevelop::OutputJob::Silent) return; QStandardItemModel *m = qobject_cast<QStandardItemModel*>(model()); QStandardItem *previous = m->item(m->rowCount()-1); if (message == "." && previous && previous->text().contains(QRegExp("\\.+"))) previous->setText(previous->text() + message); else m->appendRow(new QStandardItem(message)); KDevelop::IPlugin* i = KDevelop::ICore::self()->pluginController()->pluginForExtension("org.kdevelop.IOutputView"); if( i ) { KDevelop::IOutputView* view = i->extension<KDevelop::IOutputView>(); if( view ) { view->raiseOutput( outputId() ); } } }
void OutputExecuteJob::start() { Q_ASSERT( d->m_status == JobNotStarted ); d->m_status = JobRunning; const bool isBuilder = d->m_properties.testFlag( IsBuilderHint ); const KUrl effectiveWorkingDirectory = workingDirectory(); if( effectiveWorkingDirectory.isEmpty() ) { if( d->m_properties.testFlag( NeedWorkingDirectory ) ) { // A directory is not given, but we need it. setError( InvalidWorkingDirectoryError ); if( isBuilder ) { setErrorText( i18n( "No build directory specified for a builder job." ) ); } else { setErrorText( i18n( "No working directory specified for a process." ) ); } return emitResult(); } setModel( new OutputModel ); } else { // Basic sanity checks. if( !effectiveWorkingDirectory.isValid() ) { setError( InvalidWorkingDirectoryError ); if( isBuilder ) { setErrorText( i18n( "Invalid build directory '%1'", effectiveWorkingDirectory.prettyUrl() ) ); } else { setErrorText( i18n( "Invalid working directory '%1'", effectiveWorkingDirectory.prettyUrl() ) ); } return emitResult(); } else if( !effectiveWorkingDirectory.isLocalFile() ) { setError( InvalidWorkingDirectoryError ); if( isBuilder ) { setErrorText( i18n( "Build directory '%1' is not a local path", effectiveWorkingDirectory.prettyUrl() ) ); } else { setErrorText( i18n( "Working directory '%1' is not a local path", effectiveWorkingDirectory.prettyUrl() ) ); } return emitResult(); } QFileInfo workingDirInfo( effectiveWorkingDirectory.toLocalFile() ); if( !workingDirInfo.isDir() ) { // If a working directory does not actually exist, either bail out or create it empty, // depending on what we need by properties. // We use a dedicated bool variable since !isDir() may also mean that it exists, // but is not a directory, or a symlink to an inexistent object. bool successfullyCreated = false; if( !d->m_properties.testFlag( CheckWorkingDirectory ) ) { successfullyCreated = QDir( effectiveWorkingDirectory.directory() ).mkdir( effectiveWorkingDirectory.fileName() ); } if( !successfullyCreated ) { setError( InvalidWorkingDirectoryError ); if( isBuilder ) { setErrorText( i18n( "Build directory '%1' does not exist or is not a directory", effectiveWorkingDirectory.prettyUrl() ) ); } else { setErrorText( i18n( "Working directory '%1' does not exist or is not a directory", effectiveWorkingDirectory.prettyUrl() ) ); } return emitResult(); } } setModel( new OutputModel( effectiveWorkingDirectory ) ); } Q_ASSERT( model() ); model()->setFilteringStrategy( d->m_filteringStrategy ); setDelegate( new OutputDelegate ); // Slots hasRawStdout() and hasRawStderr() are responsible // for feeding raw data to the line maker; so property-based channel filtering is implemented there. if( d->m_properties.testFlag( PostProcessOutput ) ) { connect( d->m_lineMaker, SIGNAL(receivedStdoutLines(QStringList)), SLOT(postProcessStdout(QStringList)) ); connect( d->m_lineMaker, SIGNAL(receivedStderrLines(QStringList)), SLOT(postProcessStderr(QStringList)) ); } else { connect( d->m_lineMaker, SIGNAL(receivedStdoutLines(QStringList)), model(), SLOT(appendLines(QStringList)) ); connect( d->m_lineMaker, SIGNAL(receivedStderrLines(QStringList)), model(), SLOT(appendLines(QStringList)) ); } if( !d->m_properties.testFlag( NoSilentOutput ) || verbosity() != Silent ) { d->m_outputStarted = true; startOutput(); } const QString joinedCommandLine = d->joinCommandLine(); QString headerLine; if( !effectiveWorkingDirectory.isEmpty() ) { headerLine = effectiveWorkingDirectory.toLocalFile( KUrl::RemoveTrailingSlash ) + "> " + joinedCommandLine; } else { headerLine = joinedCommandLine; } model()->appendLine( headerLine ); if( !effectiveWorkingDirectory.isEmpty() ) { d->m_process->setWorkingDirectory( effectiveWorkingDirectory.toLocalFile() ); } d->m_process->setProcessEnvironment( d->effectiveEnvironment() ); d->m_process->setProgram( d->effectiveCommandLine() ); d->m_process->start(); }
void Kernel::parseCommonOptions() { Options& options = m_manager.commonOptions(); if (m_visualize) options.add("visualize", m_visualize); if (m_isDebug) { options.add("debug", true); uint32_t verbosity(m_verboseLevel); if (!verbosity) verbosity = 1; options.add("verbose", verbosity); options.add("log", "STDERR"); } auto pred = [](char c){ return (bool)strchr(",| ", c); }; if (!m_scales.empty()) { std::vector<double> scales; StringList scaleTokens = Utils::split2(m_scales, pred); for (std::string s : scaleTokens) { double val; if (Utils::fromString(s, val)) scales.push_back(val); else { std::ostringstream oss; oss << getName() << ": Invalid scale value '" << s << "'." << std::endl; throw pdal_error(oss.str()); } } if (scales.size() > 0) options.add("scale_x", scales[0]); if (scales.size() > 1) options.add("scale_y", scales[1]); if (scales.size() > 2) options.add("scale_z", scales[2]); } if (!m_offsets.empty()) { std::vector<double> offsets; StringList offsetTokens = Utils::split2(m_offsets, pred); for (std::string o : offsetTokens) { double val; if (Utils::fromString(o, val)) offsets.push_back(val); else { std::ostringstream oss; oss << getName() << ": Invalid offset value '" << o << "'." << std::endl; throw pdal_error(oss.str()); } } if (offsets.size() > 0) options.add("offset_x", offsets[0]); if (offsets.size() > 1) options.add("offset_y", offsets[1]); if (offsets.size() > 2) options.add("offset_z", offsets[2]); } }
Stage* Translate::makeReader(Options readerOptions) { if (isDebug()) { readerOptions.add<bool>("debug", true); boost::uint32_t verbosity(getVerboseLevel()); if (!verbosity) verbosity = 1; readerOptions.add<boost::uint32_t>("verbose", verbosity); readerOptions.add<std::string>("log", "STDERR"); } Stage* reader_stage = AppSupport::makeReader(readerOptions); Stage* final_stage(0); if (!m_bounds.empty() || !m_wkt.empty() || !m_output_srs.empty()) { Stage* next_stage = reader_stage; Stage* crop_stage(0); Stage* reprojection_stage(0); if (!m_output_srs.empty()) { readerOptions.add<std::string >("out_srs", m_output_srs.getWKT()); boost::char_separator<char> sep(SEPARATORS); std::vector<double> offsets; tokenizer off_tokens(m_offsets, sep); for (tokenizer::iterator t = off_tokens.begin(); t != off_tokens.end(); ++t) { offsets.push_back(boost::lexical_cast<double>(*t)); } std::vector<double> scales; tokenizer scale_tokens(m_scales, sep); for (tokenizer::iterator t = scale_tokens.begin(); t != scale_tokens.end(); ++t) { scales.push_back(boost::lexical_cast<double>(*t)); } if (scales.size()) { if (scales.size() <= 1) { readerOptions.add<double >("scale_x", scales[0]); } else if (scales.size() <= 2) { readerOptions.add<double >("scale_x", scales[0]); readerOptions.add<double >("scale_y", scales[1]); } else if (scales.size() <= 3) { readerOptions.add<double >("scale_x", scales[0]); readerOptions.add<double >("scale_y", scales[1]); readerOptions.add<double >("scale_z", scales[2]); } } if (offsets.size()) { if (offsets.size() <= 1) { readerOptions.add<double >("offset_x", offsets[0]); } else if (offsets.size() <= 2) { readerOptions.add<double >("offset_x", offsets[0]); readerOptions.add<double >("offset_y", offsets[1]); } else if (offsets.size() <= 3) { readerOptions.add<double >("offset_x", offsets[0]); readerOptions.add<double >("offset_y", offsets[1]); readerOptions.add<double >("offset_z", offsets[2]); } } reprojection_stage = new pdal::filters::InPlaceReprojection(*next_stage, readerOptions); next_stage = reprojection_stage; } if (!m_bounds.empty() && m_wkt.empty()) { readerOptions.add<pdal::Bounds<double> >("bounds", m_bounds); crop_stage = new pdal::filters::Crop(*next_stage, readerOptions); next_stage = crop_stage; } else if (m_bounds.empty() && !m_wkt.empty()) { std::istream* wkt_stream; try { wkt_stream = FileUtils::openFile(m_wkt); std::stringstream buffer; buffer << wkt_stream->rdbuf(); m_wkt = buffer.str(); FileUtils::closeFile(wkt_stream); } catch (pdal::pdal_error const&) { // If we couldn't open the file given in m_wkt because it // was likely actually wkt, leave it alone } readerOptions.add<std::string >("polygon", m_wkt); crop_stage = new pdal::filters::Crop(*next_stage, readerOptions); next_stage = crop_stage; } final_stage = next_stage; } if (final_stage == 0) final_stage = reader_stage; return final_stage; }
int Configuration::parseOption(char const* opt, char const* opt2) { int ret = Status::STAT_OK; std::string val, val2; char const* marker; char const* token = opt; int option, int_v; bool good; #line 121 "<stdout>" { char yych; yych = *opt; switch (yych) { case '\n': goto yy2; case '-': goto yy3; case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': goto yy5; default: goto yy6; } yy2: opt = marker; goto yy4; yy3: yych = *(marker = ++opt); switch (yych) { case '-': goto yy12; case '?': case 'h': goto yy15; case 's': goto yy17; case 'v': goto yy13; default: goto yy4; } yy4: #line 156 "bcplus/Configuration.r2c" { val = token; option = Option::BAD; goto re2c_finish; } #line 203 "<stdout>" yy5: yych = *(marker = ++opt); switch (yych) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': goto yy7; case '=': goto yy9; default: goto yy4; } yy6: yych = *++opt; goto yy4; yy7: ++opt; yych = *opt; switch (yych) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '_': case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': case 's': case 't': case 'u': case 'v': case 'w': case 'x': case 'y': case 'z': goto yy7; case '=': goto yy9; default: goto yy2; } yy9: ++opt; yych = *opt; if (yych >= 0x01) goto yy9; #line 150 "bcplus/Configuration.r2c" { char const* c = strchr(token, '='); val.assign(token, (size_t)(c - token)); val2.assign(c+1,opt-c-1); option = Option::MACRO_DEF; goto re2c_finish; } #line 357 "<stdout>" yy12: yych = *++opt; switch (yych) { case 'h': goto yy23; case 'p': goto yy22; case 's': goto yy20; case 'v': goto yy21; default: goto yy2; } yy13: ++opt; #line 146 "bcplus/Configuration.r2c" { EXTRACT_NAME; option = Option::VERSION; goto re2c_finish; } #line 374 "<stdout>" yy15: ++opt; #line 142 "bcplus/Configuration.r2c" { EXTRACT_NAME; option = Option::HELP; goto re2c_finish; } #line 382 "<stdout>" yy17: ++opt; switch ((yych = *opt)) { case '=': goto yy19; default: goto yy18; } yy18: #line 126 "bcplus/Configuration.r2c" { EXTRACT_NAME_VAL; option = Option::SYMTAB_INPUT; goto re2c_finish; } #line 395 "<stdout>" yy19: yych = *++opt; goto yy18; yy20: yych = *++opt; switch (yych) { case 'y': goto yy45; default: goto yy2; } yy21: yych = *++opt; switch (yych) { case 'e': goto yy37; default: goto yy2; } yy22: yych = *++opt; switch (yych) { case 'a': goto yy26; default: goto yy2; } yy23: yych = *++opt; switch (yych) { case 'e': goto yy24; default: goto yy2; } yy24: yych = *++opt; switch (yych) { case 'l': goto yy25; default: goto yy2; } yy25: yych = *++opt; switch (yych) { case 'p': goto yy15; default: goto yy2; } yy26: yych = *++opt; switch (yych) { case 'r': goto yy27; default: goto yy2; } yy27: yych = *++opt; switch (yych) { case 's': goto yy28; default: goto yy2; } yy28: yych = *++opt; switch (yych) { case 'e': goto yy29; default: goto yy2; } yy29: yych = *++opt; switch (yych) { case '-': goto yy30; default: goto yy2; } yy30: yych = *++opt; switch (yych) { case 't': goto yy31; default: goto yy2; } yy31: yych = *++opt; switch (yych) { case 'r': goto yy32; default: goto yy2; } yy32: yych = *++opt; switch (yych) { case 'a': goto yy33; default: goto yy2; } yy33: yych = *++opt; switch (yych) { case 'c': goto yy34; default: goto yy2; } yy34: yych = *++opt; switch (yych) { case 'e': goto yy35; default: goto yy2; } yy35: ++opt; #line 138 "bcplus/Configuration.r2c" { EXTRACT_NAME; option = Option::PARSE_TRACE; goto re2c_finish; } #line 496 "<stdout>" yy37: yych = *++opt; switch (yych) { case 'r': goto yy38; default: goto yy2; } yy38: yych = *++opt; switch (yych) { case 'b': goto yy40; case 's': goto yy39; default: goto yy2; } yy39: yych = *++opt; switch (yych) { case 'i': goto yy43; default: goto yy2; } yy40: ++opt; switch ((yych = *opt)) { case '=': goto yy42; default: goto yy41; } yy41: #line 134 "bcplus/Configuration.r2c" { EXTRACT_NAME_VAL; option = Option::VERBOSITY; goto re2c_finish; } #line 528 "<stdout>" yy42: yych = *++opt; goto yy41; yy43: yych = *++opt; switch (yych) { case 'o': goto yy44; default: goto yy2; } yy44: yych = *++opt; switch (yych) { case 'n': goto yy13; default: goto yy2; } yy45: yych = *++opt; switch (yych) { case 'm': goto yy46; default: goto yy2; } yy46: yych = *++opt; switch (yych) { case 't': goto yy47; default: goto yy2; } yy47: yych = *++opt; switch (yych) { case 'a': goto yy48; default: goto yy2; } yy48: yych = *++opt; switch (yych) { case 'b': goto yy49; default: goto yy2; } yy49: yych = *++opt; switch (yych) { case '-': goto yy50; default: goto yy2; } yy50: yych = *++opt; switch (yych) { case 'i': goto yy52; case 'o': goto yy51; default: goto yy2; } yy51: yych = *++opt; switch (yych) { case 'u': goto yy53; default: goto yy2; } yy52: yych = *++opt; switch (yych) { case 'n': goto yy17; default: goto yy2; } yy53: yych = *++opt; switch (yych) { case 't': goto yy54; default: goto yy2; } yy54: ++opt; switch ((yych = *opt)) { case '=': goto yy56; default: goto yy55; } yy55: #line 130 "bcplus/Configuration.r2c" { EXTRACT_NAME_VAL; option = Option::SYMTAB_OUTPUT; goto re2c_finish; } #line 611 "<stdout>" yy56: ++opt; yych = *opt; goto yy55; } #line 160 "bcplus/Configuration.r2c" re2c_finish: switch (option) { case Option::SYMTAB_INPUT: // if (fs::native(val2)) { _symtab_in = new ReferencedPath(val2); // } else { // ret = Status::STAT_BAD_ARG; // std::cerr << "ERROR: \"" << val2 << "\" is not a valid file path." << std::endl; // } break; case Option::SYMTAB_OUTPUT: // if (fs::native(val2)) { _symtab_out = new ReferencedPath(val2); // } else { // ret = Status::STAT_BAD_ARG; // std::cerr << "ERROR: \"" << val2 << "\" is not a valid file path." << std::endl; // // } break; case Option::VERBOSITY: good = babb::utils::fromString(val2.c_str(), int_v); if (!good || int_v < 0) { ret = Status::STAT_BAD_ARG; std::cerr << "ERROR: Bad value provided for command line option. Expected a non-negative integer for argument \"" << val << "\"." << std::endl; } else { verbosity(int_v); } break; case Option::PARSE_TRACE: _parse_trace = true; break; case Option::MACRO_DEF: addMacro(new ReferencedString(val), new ReferencedString(val2)); break; case Option::HELP: ret = Status::STAT_HELP; break; case Option::VERSION: ret = Status::STAT_VERSION; break; case Option::BAD: default: ret = Status::STAT_BAD_ARG; break; } return ret; }