private ExpressionValue eval(List<ExpressionElement> list) throws ExpressionException {
		// first evaluate any sub-lists grouped by parenthesis
		processGroups(list);

		// next process any unary operators
		processUnaryOperators(list);

		// final process binary operators in operator precedence order.
		processBinaryOperators(list);

		// if everything evaluated properly, there should only be one item left in the list
		if (list.size() != 1) {
			String result = list.stream().map(Object::toString).collect(Collectors.joining(" "));
			throw new ExpressionException("Parse failed! Stopped at \"" + result + "\"");
		}

		ExpressionElement element = list.get(0);
		if (element instanceof ExpressionValue ev) {
			return ev;
		}
		throw new ExpressionException("Parse failed to evaluate to a value! Stopped at " + element);
	}
Evaluates a list of valid expression elements into a single final value.
@param list the list of valid expression elements.
@return the final value the expression evaluates to
@throws ExpressionException if sequence of expression elements is not in a valid order such
that it evaluates to a single value. (such as two values not being separated by an operator)
Ghidra/Framework/Generic/src/main/java/generic/expressions/ExpressionEvaluator.java