public static Tree notTree(Tree boolExpr) {
		boolExpr = removeParenthesisTree(boolExpr);
		switch (boolExpr.getType()) {
			case SleighParser.OP_EQUAL:
				return makeTree(SleighParser.OP_NOTEQUAL, "!=", getChildren(boolExpr));
			case SleighParser.OP_NOTEQUAL:
				return makeTree(SleighParser.OP_EQUAL, "==", getChildren(boolExpr));
			case SleighParser.OP_FEQUAL:
				return makeTree(SleighParser.OP_FNOTEQUAL, "f!=", getChildren(boolExpr));
			case SleighParser.OP_FNOTEQUAL:
				return makeTree(SleighParser.OP_FEQUAL, "f==", getChildren(boolExpr));

			case SleighParser.OP_LESS:
				return makeTree(SleighParser.OP_GREATEQUAL, ">=", getChildren(boolExpr));
			case SleighParser.OP_LESSEQUAL:
				return makeTree(SleighParser.OP_GREAT, ">", getChildren(boolExpr));
			case SleighParser.OP_GREATEQUAL:
				return makeTree(SleighParser.OP_LESS, "<", getChildren(boolExpr));
			case SleighParser.OP_GREAT:
				return makeTree(SleighParser.OP_LESSEQUAL, "<=", getChildren(boolExpr));

			case SleighParser.OP_SLESS:
				return makeTree(SleighParser.OP_SGREATEQUAL, "s>=", getChildren(boolExpr));
			case SleighParser.OP_SLESSEQUAL:
				return makeTree(SleighParser.OP_SGREAT, "s>", getChildren(boolExpr));
			case SleighParser.OP_SGREATEQUAL:
				return makeTree(SleighParser.OP_SLESS, "s<", getChildren(boolExpr));
			case SleighParser.OP_SGREAT:
				return makeTree(SleighParser.OP_SLESSEQUAL, "s<=", getChildren(boolExpr));

			case SleighParser.OP_FLESS:
				return makeTree(SleighParser.OP_FGREATEQUAL, "f>=", getChildren(boolExpr));
			case SleighParser.OP_FLESSEQUAL:
				return makeTree(SleighParser.OP_FGREAT, "f>", getChildren(boolExpr));
			case SleighParser.OP_FGREATEQUAL:
				return makeTree(SleighParser.OP_FLESS, "f<", getChildren(boolExpr));
			case SleighParser.OP_FGREAT:
				return makeTree(SleighParser.OP_FLESSEQUAL, "f<=", getChildren(boolExpr));

			case SleighParser.OP_NOT:
				return removeParenthesisTree(boolExpr.getChild(0));
			default:
				return makeTree(SleighParser.OP_NOT, "!", List.of(
					makeTree(SleighParser.OP_PARENTHESIZED, "(...)", List.of(
						boolExpr))));
		}
	}
Apply the boolean "not" operator to a Sleigh expression

<p>
This will attempt to invert the expression when possible, e.g., by changing a top-level
"equals" to "not equals." If that is not possible, the this adds parenthesis and applies the
actual Sleigh boolean "not" operator.

@param boolExpr the result of parsing a Sleigh expression
@return the tree for the inverted expression
Ghidra/Framework/Emulation/src/main/java/ghidra/pcode/exec/SleighUtils.java