Lexer translates expression to sequence of tokens:
Parser checks validity of sequence of tokens and translates it to postfix notation.
Reverse Polish notation (RPN), also known as postfix notation, is a mathematical notation in which operators follow their operands. It does not need any parentheses as long as each operator has a fixed number of operands.
Postfix Notation:
Then the postfix notation is transformed into pseudocode - a sequence of commands that will be executed one after another.
Then commands in pseudocode are executed one by one while saving results of executed commands in execution stack. If command requires an result of previous command execution (POP), then value of operand is extracted from the stack.
NaN