Definition:Polish Notation/Reverse Polish Notation

 For stack-based programming languages, reverse Polish language is a useful variant of Polish notation, because it naturally coincides with how the input is to be structured for the language.

As the name suggests, a string $\mathsf P$ is in reverse Polish language reversing it gives a string $\tilde{\mathsf P}$ in Polish notation.

Thus the reverse Polish language equivalents of these examples of Polish notation:


 * $\Box p q \ldots$
 * $\Box {\diamond} p {\diamond} q \ldots$

are:


 * $\ldots q p \Box$
 * $\ldots q {\diamond} p {\diamond} \Box$

Also see

 * Unique Readability for Reverse Polish Notation