From e410a7e2a4b1a6dafd0dc6a49566c95433dd889f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Wed, 12 Sep 2001 09:17:46 +0000 Subject: [PATCH] fix parser bug if \atop etc appear inside \left ... \right git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2731 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/math_parser.C | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mathed/math_parser.C b/src/mathed/math_parser.C index 94aaea7ad7..049de097b2 100644 --- a/src/mathed/math_parser.C +++ b/src/mathed/math_parser.C @@ -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; } -- 2.39.2