}
}
-static inline wint_t psi_num_exp_op_tok(token_t op)
+static inline const char *psi_num_exp_op_tok(token_t op)
{
switch (op) {
case PSI_T_NOT:
- return L'!';
+ return "!";
case PSI_T_TILDE:
- return L'~';
+ return "~";
case PSI_T_LPAREN:
- return L'(';
+ return "(";
case PSI_T_PIPE:
- return L'|';
+ return "|";
case PSI_T_CARET:
- return L'^';
+ return "^";
case PSI_T_AMPERSAND:
- return L'&';
+ return "&";
case PSI_T_LSHIFT:
- return L'«';
+ return "<<";
case PSI_T_RSHIFT:
- return L'»';
+ return ">>";
case PSI_T_PLUS:
- return L'+';
+ return "+";
case PSI_T_MINUS:
- return L'-';
+ return "-";
case PSI_T_ASTERISK:
- return L'*';
+ return "*";
case PSI_T_SLASH:
- return L'/';
+ return "/";
case PSI_T_MODULO:
- return L'%';
+ return "%";
case PSI_T_OR:
- return L'∨';
+ return "||";
case PSI_T_AND:
- return L'∧';
+ return "&&";
case PSI_T_CMP_EQ:
- return L'≣';
+ return "==";
case PSI_T_CMP_NE:
- return L'≠';
+ return "!=";
case PSI_T_CMP_LE:
- return L'≤';
+ return "<=";
case PSI_T_CMP_GE:
- return L'≥';
+ return ">=";
case PSI_T_RCHEVR:
- return L'>';
+ return ">";
case PSI_T_LCHEVR:
- return L'<';
+ return "<";
default:
assert(0);
case PSI_T_NOT:
case PSI_T_TILDE:
- dprintf(fd, "%lc", psi_num_exp_op_tok(exp->op));
+ dprintf(fd, "%s", psi_num_exp_op_tok(exp->op));
psi_num_exp_dump(fd, exp->data.u);
break;
case PSI_T_ASTERISK:
case PSI_T_SLASH:
psi_num_exp_dump(fd, exp->data.b.lhs);
- dprintf(fd, " %lc ", psi_num_exp_op_tok(exp->op));
+ dprintf(fd, " %s ", psi_num_exp_op_tok(exp->op));
psi_num_exp_dump(fd, exp->data.b.rhs);
break;
if (entry.type == PSI_T_LPAREN) {
break;
}
- if (frame) PSI_DEBUG_PRINT(frame->context, " %lc", psi_num_exp_op_tok(entry.type));
+ if (frame) PSI_DEBUG_PRINT(frame->context, " %s", psi_num_exp_op_tok(entry.type));
output = psi_plist_add(output, &entry);
}
break;
break;
}
psi_plist_pop(input, NULL);
- if (frame) PSI_DEBUG_PRINT(frame->context, " %lc", psi_num_exp_op_tok(entry.type));
+ if (frame) PSI_DEBUG_PRINT(frame->context, " %s", psi_num_exp_op_tok(entry.type));
output = psi_plist_add(output, &entry);
}
entry.type = exp->op;
break;
}
psi_plist_pop(input, NULL);
- if (frame) PSI_DEBUG_PRINT(frame->context, " %lc", psi_num_exp_op_tok(entry.type));
+ if (frame) PSI_DEBUG_PRINT(frame->context, " %s", psi_num_exp_op_tok(entry.type));
output = psi_plist_add(output, &entry);
}
entry.type = exp->op;
psi_num_exp_reduce(exp, &output, &input, frame);
while (psi_plist_pop(input, &entry)) {
- if (frame) PSI_DEBUG_PRINT(frame->context, " %lc", psi_num_exp_op_tok(entry.type));
+ if (frame) PSI_DEBUG_PRINT(frame->context, " %s", psi_num_exp_op_tok(entry.type));
output = psi_plist_add(output, &entry);
}
if (frame) PSI_DEBUG_PRINT(frame->context, "%s", "\n");
case PSI_T_NOT:
case PSI_T_TILDE:
psi_plist_pop(input, &rhs);
- if (frame) PSI_DEBUG_PRINT(frame->context, " %lc", psi_num_exp_op_tok(entry.type));
+ if (frame) PSI_DEBUG_PRINT(frame->context, " %s", psi_num_exp_op_tok(entry.type));
psi_impl_val_dump(rhs.type, &rhs.data.value, frame);
entry.type = entry.data.calc(rhs.type, &rhs.data.value, 0, NULL, &entry.data.value);
psi_plist_pop(input, &lhs);
psi_impl_val_dump(lhs.type, &lhs.data.value, frame);
- if (frame) PSI_DEBUG_PRINT(frame->context, " %lc", psi_num_exp_op_tok(entry.type));
+ if (frame) PSI_DEBUG_PRINT(frame->context, " %s", psi_num_exp_op_tok(entry.type));
psi_impl_val_dump(rhs.type, &rhs.data.value, frame);
entry.type = entry.data.calc(