Tag Archive: shunting-yard


The following program converts an expression from infix to postfix notation. The conversion is carried out with the help of a stack. For example, to turn the expression (A + B) into the postfix form A B +, we ignore the left parenthesis, convert the A to postfix form, we store the + operator on the stack, we convert B to postfix form and then, when find the right parenthesis, we pop the + operator from the top of the stack. In particular, the following implementation works only for the addition and multiplication of integers.

Continue reading

This project refers to an Arduino sketch that implements a calculator which valuates infix mathematical expressions using appropriate algorithms and data structures. The mathematical expressions are given through the USB port, while the valuation and presentation of results is done by Arduino. The results are displayed in an appropriate LCD display.

Continue reading