int JudgePriority(char s1, char s2) {
switch (s1)
{
case '+':
if (s2 == '+' || s2 == '-' || s2 == ')' || s2 == '#') {
return 1;
}
else return -1;
case '-':
if (s2 == '/' || s2 == '(') {
return -1;
}
else return 1;
case '*':
if (s2 == '(') {
return -1;
}
else return 1;
case '/':
if (s2 == '(') {
return -1;
}
else return 1;
case '(':
if (s2 == ')') {
return 0;
}
else if (s2 == '#') { return 1; }
else return -1;
case ')':
if (s2 == '(') {
return 0;
}
else return 1;
case '#':
if (s2 == '#') {
return 0;
}
else return -1;
default:
break;
}
}
void Transform(SeqStack<char> &sympl_stack, char present[]) {