Skip to content

Latest commit

 

History

History
21 lines (12 loc) · 794 Bytes

File metadata and controls

21 lines (12 loc) · 794 Bytes

What is RPN

Reverse Polish Notation (RPN) is a postfix mathematical notation. It means that every operator follows all its operands. You can visit Wikipedia to learn more about it http://en.wikipedia.org/wiki/Reverse_polish_notation.

What is RPN.py

RPN.py is a simple module that facilitates conversion from infix notation (e.g. 2 + 2) to postfix notation (e.g. 2 2 +). It also allows to define your own operators. It may be useful if you'd like to use it to parse (and evaluate) the arithemetical-like expression for example in your application configuration.

Implementation status

[x] Custom operators definition (RPNOperator class)

[x] Infix to postfix conversion (RPNParser class)

[] Postfix expression evaluation

[] Usage examples