string Parser::parse_verbatim_option()
{
string Parser::parse_verbatim_option()
{
string res;
if (nextToken().character() == '[') {
Token t = getToken();
string res;
if (nextToken().character() == '[') {
Token t = getToken();
string Parser::parse_verbatim_item()
{
string Parser::parse_verbatim_item()
{
string res;
if (nextToken().cat() == catBegin) {
Token t = getToken();
string res;
if (nextToken().cat() == catBegin) {
Token t = getToken();
-void Parser::parse2(MathAtom & at, unsigned flags, mode_type mode,
- bool numbered)
+void Parser::parse2(MathAtom & at, const unsigned flags, const mode_type mode,
+ const bool numbered)
{
parse1(*(at.nucleus()->asGridInset()), flags, mode, numbered);
}
void Parser::parse1(MathGridInset & grid, unsigned flags,
{
parse1(*(at.nucleus()->asGridInset()), flags, mode, numbered);
}
void Parser::parse1(MathGridInset & grid, unsigned flags,
- mode_type mode, bool numbered)
+ const mode_type mode, const bool numbered)
{
int limits = 0;
MathGridInset::row_type cellrow = 0;
{
int limits = 0;
MathGridInset::row_type cellrow = 0;
#endif
if (flags & FLAG_ITEM) {
#endif
if (flags & FLAG_ITEM) {
- if (t.cat() == catSpace)
- continue;
flags &= ~FLAG_ITEM;
if (t.cat() == catBegin) {
flags &= ~FLAG_ITEM;
if (t.cat() == catBegin) {
}
else if (t.cs() == "left") {
}
else if (t.cs() == "left") {
string l = getToken().asString();
MathArray ar;
parse(ar, FLAG_RIGHT, mode);
string l = getToken().asString();
MathArray ar;
parse(ar, FLAG_RIGHT, mode);
string r = getToken().asString();
cell->push_back(MathAtom(new MathDelimInset(l, r, ar)));
}
string r = getToken().asString();
cell->push_back(MathAtom(new MathDelimInset(l, r, ar)));
}
else if (t.cs() == "begin") {
string const name = getArg('{', '}');
else if (t.cs() == "begin") {
string const name = getArg('{', '}');
if (name == "array" || name == "subarray") {
string const valign = parse_verbatim_option() + 'c';
if (name == "array" || name == "subarray") {
string const valign = parse_verbatim_option() + 'c';
parse2(cell->back(), FLAG_END, mode, false);
}
parse2(cell->back(), FLAG_END, mode, false);
}
- if (name == "tabular") {
+ else if (name == "tabular") {
string const valign = parse_verbatim_option() + 'c';
string const halign = parse_verbatim_item();
cell->push_back(MathAtom(new MathTabularInset(name, valign[0], halign)));
string const valign = parse_verbatim_option() + 'c';
string const halign = parse_verbatim_item();
cell->push_back(MathAtom(new MathTabularInset(name, valign[0], halign)));
- // lyxerr << "unknow math inset begin '" << name << "'\n";
+ //lyxerr << "unknow math inset begin '" << name << "'\n";
// create generic environment inset
cell->push_back(MathAtom(new MathEnvInset(name)));
// create generic environment inset
cell->push_back(MathAtom(new MathEnvInset(name)));
- parse(cell->back().nucleus()->cell(0), FLAG_END, mode);
+ parse2(cell->back(), FLAG_END, mode, false);