We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
连接运算符优先级比选择运算符高,下面的源码需要调整
int isp(char c) { switch (c) { case '#': return 0; case '(': return 1; case '': return 7; case '|': return 5; case '+': return 3; case ')': return 8; } //若走到这一步,说明出错了 cerr << "ERROR!" << endl; return false; } //in coming priority 栈外优先级,当前扫描到的字符的优先级 int icp(char c) { switch (c) { case '#': return 0; case '(': return 8; case '': return 6; case '|': return 4; case '+': return 2; case ')': return 1; } //若走到这一步,说明出错了 cerr << "ERROR!" << endl; return false; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
连接运算符优先级比选择运算符高,下面的源码需要调整
int isp(char c)
{
switch (c)
{
case '#': return 0;
case '(': return 1;
case '': return 7;
case '|': return 5;
case '+': return 3;
case ')': return 8;
}
//若走到这一步,说明出错了
cerr << "ERROR!" << endl;
return false;
}
//in coming priority 栈外优先级,当前扫描到的字符的优先级
int icp(char c)
{
switch (c)
{
case '#': return 0;
case '(': return 8;
case '': return 6;
case '|': return 4;
case '+': return 2;
case ')': return 1;
}
//若走到这一步,说明出错了
cerr << "ERROR!" << endl;
return false;
}
The text was updated successfully, but these errors were encountered: