RPN
Jan Łukasiewicz (Inventor of RPN)
Infix to postfix
Reverse Polish notation (RPN), also known as Polish postfix notation or simply postfix notation, is a mathematical notation in which operators follow their operands, in contrast to Polish notation (PN), in which operators precede their operands. It does not need any parentheses as long as each operator has a fixed number of operands. The description "Polish" refers to the nationality of logician Jan Łukasiewicz, who invented Polish notation in 1924 -Wikipedia
Npm
Downloading
$npm i rpn-infix-postfix
Usage
const infixToPostfix postfixSolver solve Stack } = ; console; // result => 19console; // result => 142-*
Downloading (via git)
git clone https://github.com/SC0d3r/RPN-infix-to-postfix.git RPN
cli Usage
after cloning go to directory and then run the following command
$node indexjs '1* ( 2 + 3)' > 5 result
only postfix version
$node indexjs '1* ( 2 + 3)' -postfix > 123+* result
Test
run tests with
$npm test