diff --git a/eo/src/utils/eoParser.cpp b/eo/src/utils/eoParser.cpp index 3f19c75e..10a2bea4 100644 --- a/eo/src/utils/eoParser.cpp +++ b/eo/src/utils/eoParser.cpp @@ -142,61 +142,68 @@ void eoParser::updateParameters() const void eoParser::readFrom(istream& is) { string str; + // we must avoid processing \section{xxx} if xxx is NOT "Parser" + bool processing = true; while (is >> str) - { + { + if (str.find(string("\\section{"))==0) // found section begin + processing = (str.find(string("Parser"))= 3) - value = string(str.begin() + 3, str.end()); - } - else - { - value = string(str.begin() + 2, str.end()); - } - } + if (str.size() >= 2) + { + if (str[2] == '=') + { + if (str.size() >= 3) + value = string(str.begin() + 3, str.end()); + } + else + { + value = string(str.begin() + 2, str.end()); + } + } - shortNameMap[str[1]] = value; - } - } + shortNameMap[str[1]] = value; + } + } + } } updateParameters();