]> git.lyx.org Git - features.git/commitdiff
fix parser bug if \atop etc appear inside \left ... \right
authorAndré Pönitz <poenitz@gmx.net>
Wed, 12 Sep 2001 09:17:46 +0000 (09:17 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Wed, 12 Sep 2001 09:17:46 +0000 (09:17 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2731 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/math_parser.C

index 94aaea7ad789f058c3ea45ba167791b27b090068..049de097b22b8ae17add88742db1a3e1b7172420 100644 (file)
@@ -424,6 +424,7 @@ void Parser::tokenize(string const & buffer)
 void Parser::error(string const & msg) 
 {
        lyxerr << "Line ~" << lineno_ << ": Math parse error: " << msg << endl;
+       //exit(1);
 }
 
 
@@ -652,7 +653,7 @@ void Parser::parse_into(MathArray & array, unsigned flags, MathTextCodes code)
                }
 
                if (flags & FLAG_BLOCK) {
-                       if (t.cat() == catAlign || t.cs() == "\\")
+                       if (t.cat() == catAlign || t.cs() == "\\" || t.cs() == "right")
                                return;
                        if (t.cs() == "end") {
                                getArg('{', '}');
@@ -767,8 +768,10 @@ void Parser::parse_into(MathArray & array, unsigned flags, MathTextCodes code)
                }
                
                else if (t.cs() == "right") {
-                       if (!(flags & FLAG_RIGHT))
+                       if (!(flags & FLAG_RIGHT)) {
+                               lyxerr << "got so far: '" << array << "'\n";
                                error("Unmatched right delimiter");
+                       }
                        return;
                }