} else if (word == C_R_GROUP) {
while (true) {
if (lastOperation < 0) {
throw new ParseException("缺失左括号");
}
Operation op = operations[lastOperation];
lastOperation--;
if (op != null) {
expressionSize -= op.process(expressions, expressionSize, mode);
} else {
break;
}
}
isFirst = false;
} else {
for (Operation op : opers) {
outer: for (Object[] name : op.names) {
// 有一些操作符是由一组汉字组成的, 需要比较每一个
int len = name.length;
int index = i + len - 1;
if (index < end) {
for (; index >= i; index--) {
if (!name[index - i].equals(words[index])) {
continue outer;
}
}
// 如果栈内存在优先级较高的符号, 需要将数据弹出栈
int priority = op.priority;
for (; lastOperation >= 0; lastOperation--) {
Operation tmp = operations[lastOperation];
if ((tmp != null) && (priority <= tmp.priority)) {
expressionSize -= tmp.process(expressions, expressionSize,
mode);
} else {
break;
}
}