]> git.lyx.org Git - lyx.git/blobdiff - src/Lexer.cpp
* src/inset/InsetNomencl.cpp:
[lyx.git] / src / Lexer.cpp
index 5136c672073d6dc451360a22f6b088915c1a66f3..108d26ba2caacd77194429203808638eeb6e6bcf 100644 (file)
@@ -173,7 +173,9 @@ void Lexer::Pimpl::printError(string const & message) const
 {
        string const tmpmsg = subst(message, "$$Token", getString());
        lyxerr << "LyX: " << tmpmsg << " [around line " << lineno
-               << " of file " << to_utf8(makeDisplayPath(name)) << ']' << endl;
+               << " of file " << to_utf8(makeDisplayPath(name))
+               << " current token: '" << getString() << "'"
+               << " context: '" << context << "']" << endl;
 }
 
 
@@ -311,11 +313,6 @@ bool Lexer::Pimpl::next(bool esc /* = false */)
                is.get(cc);
                c = cc;
 
-               // skip ','s
-               if (esc && c == ',')
-                       continue;
-
-               
                if (c == commentChar) {
                        // Read rest of line (fast :-)
 #if 1
@@ -380,13 +377,13 @@ bool Lexer::Pimpl::next(bool esc /* = false */)
                        break;
                }
 
-               if (!esc && c == ',')
+               if (c == ',')
                        continue;              /* Skip ','s */
 
-                       // using relational operators with chars other
-                       // than == and != is not safe. And if it is done
-                       // the type _have_ to be unsigned. It usually a
-                       // lot better to use the functions from cctype
+               // using relational operators with chars other
+               // than == and != is not safe. And if it is done
+               // the type _have_ to be unsigned. It usually a
+               // lot better to use the functions from cctype
                if (c > ' ' && is)  {
                        buff.clear();
 
@@ -404,7 +401,7 @@ bool Lexer::Pimpl::next(bool esc /* = false */)
                        status = LEX_TOKEN;
                }
 
-               if (!esc && c == '\r' && is) {
+               if (c == '\r' && is) {
                        // The Windows support has lead to the
                        // possibility of "\r\n" at the end of
                        // a line.  This will stop LyX choking
@@ -639,6 +636,7 @@ void Lexer::setCommentChar(char c)
        pimpl_->setCommentChar(c);
 }
 
+
 int Lexer::lex()
 {
        return pimpl_->lex();
@@ -765,6 +763,7 @@ bool Lexer::getBool() const
        pimpl_->printError("Bad boolean `$$Token'. "
                                 "Use \"false\" or \"true\"");
        lastReadOk_ = false;
+       return false;
 }