OPP :: 01

This page is about operator precedence parsing. Some background notes are here.

Operators are + - * / = % (mod) and ^ exponentiation. Variable names are lower case a to z. Brackets are ( ) round.

Valid expression examples are 3+4 7*(4+3) 12.2-5.6 x=9 y=2*x+1

In this panel the user can input a single expression, tokenise it, then evaluate it seeing the stacks one step at a time.

The table below shows stacks before the step, and the token being processed. 'Action' describes what happens. Resulting stacks are shown in the next line.

Step Operator stack Value stack Token Action