The way I once did it was to count the brackets () and start with the lowest pair ie where you have ( followed by ), then work up from there. When you encounter some other symbol you do math on the numbers to each side, etc.
Alternatively in BlitzMax you could use function pointers and call functions for each kind of operation/scenario.
Alternatively in BlitzMax you could use function pointers and call functions for each kind of operation/scenario.