- LRegex reg("^([12][0-9][0-9])[ \t]+\"([^ ]+)\".*");
- while(getline(ifs, line)) {
- if (reg.exact_match(line)) {
- LRegex::SubMatches const & sub = reg.exec(line);
- n = atoi(line.substr(sub[1].first,
- sub[1].second).c_str());
- str = LSubstring(line, sub[2].first, sub[2].second);
+ // Ok, I'll be the first to admit that this is probably not
+ // the fastest way to parse the cdef files, but I though it
+ // was a bit neat. Anyway it is wrong to use the lyxlex parse
+ // without the use of a keyword table.
+ regex reg("^([12][0-9][0-9])[ \t]+\"([^ ]+)\".*");
+ while (getline(ifs, line)) {
+ smatch sub;
+ if (regex_match(line, sub, reg)) {
+ int const n = convert<int>(sub.str(1));
+ string const str = sub.str(2);