I think you mean RPN (Reverse polish notation)?

Take a look at Wikipedia:Reverse Polish Notation for a simple algorithm for evaluating RPN expressions.