keyword_t *operator = operators + i;
if (codecmp (operator->keyword, str) == 0) {
VERBOSE (DEBUG, fprintf (stdout, "start processing operator\n"));
- if (root) {
+ if ((root) && (root->prio == 9)) {
+ VERBOSE (DEBUG, fprintf (stdout, "terminal function (%d)\n", root->func));
+ delelement (root);
+ return ERROR_OP;
+ } else if (root) {
if ((prio) && (prio > operator->prio)) {
VERBOSE (DEBUG, fprintf (stdout, "stop because operator priority\n"));
*next = str;
return ERROR_OP;
}
} else if (*str == '-') {
- root = newelement (Sig, 1, 9);
+ root = newelement (Sig, 1, 6);
} else {
return ERROR_OP;
}