- LYXERR(Debug::TCLASS) << "Module name: " << modName << endl;
- if (lex.next()) {
- string const fname = lex.getString();
- LYXERR(Debug::TCLASS) << "Filename: " << fname << endl;
- if (lex.next()) {
- string const desc = lex.getString();
- LYXERR(Debug::TCLASS) << "Description: " << desc << endl;
- //FIXME Add package read, and availability
- // This code is run when we have
- // modName, fname, and desc
- addLayoutModule(modName, fname, desc);
- }
+ LYXERR(Debug::TCLASS, "Module name: " << modName);
+ if (!lex.next())
+ break;
+ string const fname = lex.getString();
+ LYXERR(Debug::TCLASS, "Filename: " << fname);
+ if (!lex.next())
+ break;
+ string const desc = lex.getString();
+ LYXERR(Debug::TCLASS, "Description: " << desc);
+ //FIXME Add packages
+ if (!lex.next())
+ break;
+ string str = lex.getString();
+ LYXERR(Debug::TCLASS, "Packages: " << str);
+ vector<string> pkgs;
+ while (!str.empty()) {
+ string p;
+ str = split(str, p, ',');
+ pkgs.push_back(p);
+ }
+ if (!lex.next())
+ break;
+ str = lex.getString();
+ LYXERR(Debug::TCLASS, "Required: " << str);
+ vector<string> req;
+ while (!str.empty()) {
+ string p;
+ str = split(str, p, '|');
+ req.push_back(p);