/*
* Allow for BEDMAS ordering. Gross ordering is first number,
* fine ordering is second number. Unused operators are assigned as zero.
+ *
+ * Larger numbers are higher precedence.
*/
#define P(_x, _y) (((_x) << 4) | (_y))
[T_INVALID] = 0,
/*
- * Assignment operators go here:
+ * Assignment operators go here as P(1,n)
*
* += -= *= /= %= <<= >>= &= ^= |=
*
[T_XOR] = P(3,1),
[T_AND] = P(3,2),
- [T_OP_CMP_EQ] = P(4,0),
- [T_OP_NE] = P(4,0),
+ [T_OP_REG_EQ] = P(4,0),
+ [T_OP_REG_NE] = P(4,0),
+
+ [T_OP_CMP_EQ] = P(4,1),
+ [T_OP_NE] = P(4,1),
[T_OP_LT] = P(5,0),
[T_OP_LE] = P(5,0),
[T_RSHIFT] = P(6,0),
[T_LSHIFT] = P(6,0),
- [T_ADD] = P(7,0),
- [T_SUB] = P(7,1),
-
- [T_MUL] = P(8,0),
- [T_DIV] = P(8,1),
- [T_MOD] = P(8,2),
+ [T_SUB] = P(7,0),
+ [T_ADD] = P(7,1),
- [T_OP_REG_EQ] = P(9,0),
- [T_OP_REG_NE] = P(9,0),
+ [T_MOD] = P(8,0),
+ [T_MUL] = P(8,1),
+ [T_DIV] = P(8,2),
[T_LBRACE] = P(10,0),
};