Changeset 521
- Timestamp:
- Dec 24, 2007, 11:34:54 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.svndigest/config
r519 r521 31 31 ### Section for setting parsing modes 32 32 ### The format of the entries is: 33 ### file-name-pattern = start-code : end-code33 ### file-name-pattern = "start-code" : "end-code" 34 34 ### The file-name-pattern may contain wildcards (such as '*' and '?'). 35 ### String " <NEWLINE>" can be used for codons containing newline36 ### character : '\n'35 ### String "\n" can be used for codons containing newline 36 ### character. 37 37 [parsing-codons] 38 *.ac = # : <NEWLINE> ; dnl : <NEWLINE>39 *.am = # : <NEWLINE> ; dnl : <NEWLINE>40 *.m4 = # : <NEWLINE> ; dnl : <NEWLINE>41 *.c = // : <NEWLINE> ; /* : */42 *.cc = // : <NEWLINE> ; /* : */43 *.cpp = // : <NEWLINE> ; /* : */44 *.cxx = // : <NEWLINE> ; /* : */45 *.h = // : <NEWLINE> ; /* : */46 *.hh = // : <NEWLINE> ; /* : */47 *.hpp = // : <NEWLINE> ; /* : */48 *.java = // : <NEWLINE> ; /* : */49 *.pl = # : <NEWLINE>50 *.pm = # : <NEWLINE>51 *.sh = # : <NEWLINE>52 *config = # : <NEWLINE>53 bootstrap = # : <NEWLINE>54 Makefile = # : <NEWLINE>55 *.tex = % : <NEWLINE>56 *.m = % : <NEWLINE>57 *.jsp = <!-- : -->58 *.html = <%-- : --%>59 *.xml = <!-- : --> ; <!-- : -->60 *.xsl = <!-- : -->61 *.xsd = <!-- : -->62 *.xhtml = <!-- : -->63 *.shtml = <!-- : -->64 *.css = <!-- : -->65 *.rss = <!-- : -->66 *.sgml = <!-- : -->67 *.bat = <NEWLINE>REM : <NEWLINE> ; <NEWLINE>rem : <NEWLINE>38 *.ac = "#":"\n" ; "dnl":"\n" 39 *.am = "#":"\n" ; "dnl":"\n" 40 *.m4 = "#":"\n" ; "dnl":"\n" 41 *.c = "//":"\n" ; "/*":"*/" 42 *.cc = "//":"\n" ; "/*":"*/" 43 *.cpp = "//":"\n" ; "/*":"*/" 44 *.cxx = "//":"\n" ; "/*":"*/" 45 *.h = "//":"\n" ; "/*":"*/" 46 *.hh = "//":"\n" ; "/*":"*/" 47 *.hpp = "//":"\n" ; "/*":"*/" 48 *.java = "//":"\n" ; "/*":"*/" 49 *.pl = "#":"\n" 50 *.pm = "#":"\n" 51 *.sh = "#":"\n" 52 *config = "#":"\n" 53 bootstrap = "#":"\n" 54 Makefile = "#":"\n" 55 *.tex = "%":"\n" 56 *.m = "%":"\n" 57 *.jsp = "<!--":"-->" 58 *.html = "<%--":"--%>" 59 *.xml = "<!--":"-->" ; "<!--":"-->" 60 *.xsl = "<!--":"-->" 61 *.xsd = "<!--":"-->" 62 *.xhtml = "<!--":"-->" 63 *.shtml = "<!--":"-->" 64 *.css = "<!--":"-->" 65 *.rss = "<!--":"-->" 66 *.sgml = "<!--":"-->" 67 *.bat = "\nREM":"\n" ; "\nrem":"\n" -
trunk/lib/Configuration.cc
r519 r521 221 221 while (getline(ss, start, ':')) { 222 222 start = trim(start); 223 start = start.substr(1, start.size()-2); 223 224 std::string end; 224 225 getline(ss, end, ';'); 225 226 end = trim(end); 227 end = end.substr(1, end.size()-2); 226 228 if (!start.empty() && !end.empty()) { 227 replace(start, " <NEWLINE>", "\n");228 replace(end, " <NEWLINE>", "\n");229 replace(start, "\\n", "\n"); 230 replace(end, "\\n", "\n"); 229 231 add_codon(lhs, start, end); 230 232 } 231 233 else if (!start.empty() || !end.empty()) { 234 std::cout << start << "\n" << end << std::endl; 232 235 std::stringstream mess; 233 236 mess << "svndigest: invalid config file\n" … … 324 327 { 325 328 if (str.size()>0 && str[str.size()-1]=='\n') 326 return str.substr(0, str.size()-1) + std::string(" <NEWLINE>");329 return str.substr(0, str.size()-1) + std::string("\\n"); 327 330 return str; 328 331 } … … 332 335 { 333 336 if (str.size()>0 && str[0]=='\n') 334 return std::string(" <NEWLINE>") + str.substr(1);337 return std::string("\\n") + str.substr(1); 335 338 return str; 336 339 } … … 464 467 << "### Section for setting parsing modes\n" 465 468 << "### The format of the entries is:\n" 466 << "### file-name-pattern = start-code : end-code\n"469 << "### file-name-pattern = \"start-code\" : \"end-code\"\n" 467 470 << "### The file-name-pattern may contain wildcards (such as '*' " 468 471 << "and '?').\n" 469 << "### String \" <NEWLINE>\" can be used for codons containing newline"470 << "\n### character : '\\n'\n"472 << "### String \"\\n\" can be used for codons containing newline" 473 << "\n### character.\n" 471 474 << "[parsing-codons]\n"; 472 475 for (size_t i=0; i<conf.string2codons_.size(); ++i) { … … 475 478 if (j) 476 479 os << " ; "; 477 os << trans_beg_code(conf.string2codons_[i].second[j].first) 478 << " : " 479 << trans_end_code(conf.string2codons_[i].second[j].second); 480 os << "\"" << trans_beg_code(conf.string2codons_[i].second[j].first) 481 << "\":\"" 482 << trans_end_code(conf.string2codons_[i].second[j].second) 483 << "\""; 480 484 } 481 485 os << "\n"; -
trunk/test/repo/db/current
r516 r521 1 5 61l 11 57 1l 1
Note: See TracChangeset
for help on using the changeset viewer.