@screwtape isn't this called polish notation? I remember when I first learned bison/flex (GNU YACC/lex equivalent) it got me to write a polish notation calculator which was basically this