Evaluate an expression in Reverse Polish Notation given as a list of tokens: numbers (possibly negative) and operators + - * /. Division truncates toward zero (so -7 / 2 is -3). Raise ValueError for malformed expressions (too few operands, or leftover values).
Also implement to_rpn(tokens): convert an infix token list with + - * / and parentheses to RPN using the shunting-yard algorithm (all operators left-associative, * / bind tighter).