]> git.lyx.org Git - lyx.git/blobdiff - src/lyxlex_pimpl.C
Dekels tabular/textinset patches
[lyx.git] / src / lyxlex_pimpl.C
index 1f8309193da6aa09c3e2d1404582670d6e31a91b..94a268f1713fbe0868ecaac0c4e02f00b9b2d29b 100644 (file)
@@ -30,7 +30,7 @@ struct compare_tags {
 
 LyXLex::Pimpl::Pimpl(keyword_item * tab, int num) 
        : is(&fb__), table(tab), no_items(num),
-         status(0), lineno(0)
+         status(0), lineno(0), commentChar('#')
 {
        verifyTable();
 }
@@ -53,7 +53,7 @@ void LyXLex::Pimpl::printError(string const & message) const
 void LyXLex::Pimpl::printTable(ostream & os)
 {
        os << "\nNumber of tags: " << no_items << '\n';
-       for(int i= 0; i < no_items; ++i)
+       for (int i= 0; i < no_items; ++i)
                os << "table[" << i
                   << "]:  tag: `" << table[i].tag
                   << "'  code:" << table[i].code << '\n';
@@ -130,6 +130,11 @@ void LyXLex::Pimpl::setStream(istream & i)
        lineno = 0;
 }
 
+void LyXLex::Pimpl::setCommentChar(char c)
+{
+       commentChar = c;
+}
+
 
 bool LyXLex::Pimpl::next(bool esc /* = false */)
 {
@@ -146,7 +151,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
                while (is && !status) {
                        is.get(cc);
                        c = cc;
-                       if (c == '#') {
+                       if (c == commentChar) {
                                // Read rest of line (fast :-)
                                // That is not fast... (Lgb)
 #if 1
@@ -262,7 +267,7 @@ bool LyXLex::Pimpl::next(bool esc /* = false */)
                                continue;
                        }
                        
-                       if (c == '#') {
+                       if (c == commentChar) {
                                // Read rest of line (fast :-)
                                // That is still not fast... (Lgb)
 #if 1