Skip to content
Snippets Groups Projects
Commit 82bb8ea3 authored by Joaquim Casals Buñuel's avatar Joaquim Casals Buñuel
Browse files

Parser YAML changes

parent 78abee05
No related branches found
No related tags found
No related merge requests found
Pipeline #4311 passed
......@@ -248,7 +248,7 @@ public:
std::vector<std::array<std::string, 3>> getCallbacks();
std::vector<std::array<std::string, 2>> getProblem();
std::map<std::string,std::string> getParams();
void parse();
void parse(bool);
};
std::string ParserYAML::generatePath(std::string path){
std::regex r("^/.*");
......@@ -439,9 +439,10 @@ std::map<std::string,std::string> ParserYAML::getParams(){
std::map<std::string,std::string> rtn = _params;
return rtn;
}
void ParserYAML::parse(){
void ParserYAML::parse(bool freely_parse = false){
this->_parsing_file.push(generatePath(this->_file));
this->parseFirstLevel(this->_file);
if(not freely_parse){
this->parseFirstLevel(this->_file);
if(this->problem.Type() != YAML::NodeType::Undefined){
std::vector<std::string> tags = std::vector<std::string>();
......@@ -455,6 +456,10 @@ void ParserYAML::parse(){
std::vector<std::string> tags = std::vector<std::string>();
this->walkTreeR(it.n , tags , it._name);
}
}else{
std::vector<std::string> tags = std::vector<std::string>();
this->walkTreeR(loadYAML(this->_file), tags, "");
}
this->_parsing_file.pop();
}
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment