Use a stack.
Push numbers until you find an operator. Once you find an operator, pop two values, use them as operands and push the result. If at any point the stack underflows, the expression is invalid. If the input is neither a operator or a number, the expression is invalid. If there are no more tokens and the stack has more than one element, the expression is invalid.