| 1204 | |
| 1205 | |
| 1206 | static BinOpr getbinopr (int op) { |
| 1207 | switch (op) { |
| 1208 | case '+': return OPR_ADD; |
| 1209 | case '-': return OPR_SUB; |
| 1210 | case '*': return OPR_MUL; |
| 1211 | case '%': return OPR_MOD; |
| 1212 | case '^': return OPR_POW; |
| 1213 | case '/': return OPR_DIV; |
| 1214 | case TK_IDIV: return OPR_IDIV; |
| 1215 | case '&': return OPR_BAND; |
| 1216 | case '|': return OPR_BOR; |
| 1217 | case '~': return OPR_BXOR; |
| 1218 | case TK_SHL: return OPR_SHL; |
| 1219 | case TK_SHR: return OPR_SHR; |
| 1220 | case TK_CONCAT: return OPR_CONCAT; |
| 1221 | case TK_NE: return OPR_NE; |
| 1222 | case TK_EQ: return OPR_EQ; |
| 1223 | case '<': return OPR_LT; |
| 1224 | case TK_LE: return OPR_LE; |
| 1225 | case '>': return OPR_GT; |
| 1226 | case TK_GE: return OPR_GE; |
| 1227 | case TK_AND: return OPR_AND; |
| 1228 | case TK_OR: return OPR_OR; |
| 1229 | default: return OPR_NOBINOPR; |
| 1230 | } |
| 1231 | } |
| 1232 | |
| 1233 | |
| 1234 | /* |