/** * @brief xppParser::xppParser Default constructor of the parser object * * @param fn string representing the file name of the ode file * * This constructs the parser object of a given ode file. First unneeded * content is discarded, and a basic correctness check is don. Later arrays are * expanded and special constructs like markov processes and tables are handled. * Finally, the different keywords are parsed and put into the opts arrays. */ xppParser::xppParser(const std::string &fn) : fileName(fn) { try { /* Initially read in the ode file */ readFile(); /* Initialize the keyword tries for command parsing */ initializeTries(); /* Check for incorrect brackets */ checkBrackets(); /* Remove all comments */ removeComments(); /* Remove unnecessary whitespaces */ removeWhitespace(); /* Expand array descriptions */ expandArrays(); /* Extract exports to dlls */ extractExport(); /* Extract markov processes */ extractMarkov(); /* Extract table definitions */ extractTable(); /* Extract wiener processes */ extractWiener(); /* Extract globals */ extractGlobal(); /* Extract all other definitions */ extractDefinition(); /* Catch errors */ } catch (xppParserException& e) { std::cerr << e.what(); } catch (std::runtime_error& e) { std::cerr << e.what(); } catch (std::exception& e) { std::cerr << e.what(); } catch (...) { std::cerr << "Unexpected error\n"; throw; } }
bool PatternAnalysisWizard::validateCurrentPage() { switch( this->currentId() ) { //******************************************************************** // Run the desired module upon exiting the wizard: case Page_Features: int id = optionGroup->checkedId(); switch(id) { case 0: runSVM(); break; case 1: runKPLS(); break; case 2: saveModel(); break; case 3: appendModel(mod_table, filename); break; case 4: extractTable(true); break; case 5: extractTableFromModel(mod_table); break; case 6: extractTable(true); break; } return true; break; //******************************************************************** } return true; }