文档介绍:...wd...
...wd...
Push(S, 'E');
while (!((*() == '#') && (c == '#'))){
...wd...
...wd...
...wd...
Pop(S, e);
if ((e == 'E') && (((c >= '0') && (c <= '9')) ||(c>='a'&&c<='z')|| (c == '(')))
{
Push(S , 'A');
Push(S , 'T');
}
else if ((e == 'A') && (c == '+'))
{
Push(S , 'A');
Push(S , 'T');
ch++;
c = *ch;
}
else if ((e == 'A') && ((c == ')')||(c == '#')));
else if ((e == 'T') && (((c >= '0') && (c <= '9')) ||(c>='a'&&c<='z')|| (c == '(')))
Push(S , 'B');
Push(S , 'F');
}
else if ((e == 'B') && (c == '*'))
{ Push(S , 'B');
Push(S , 'F');
ch++;
c = *ch;
}
else if ((e == 'B') && ((c == '+')||(c == ')')||(c == '#')));
else if ((e == 'F') && ((c>='0'&&c<='9')||(c>='a'&&c<='z')))
{
ch++;
while (((c = *ch) >= '0') && (c <= '9')||(c>='a'&&c<='z'))
ch++;
}
else if ((e == 'F') && (c == '('))
{ Push(S, ')');
Push(S, 'E');
ch++;
c = *ch;
}
else if ((e == ')') && (c == ')'))
{ch++;
c = *ch;
}
else return error;
}
return OK;
...wd...