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
This commit is contained in:
André Pönitz 2001-09-12 09:17:46 +00:00
parent 445f2a9851
commit e410a7e2a4

View 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;
}