and spit out the correctly parenthesized/nested expression (1 + (2 * 3)). So nice! But how do they work? Bob Nystrom’s article The original paper “Top Down Operator Precedence” (PDF or this beautiful HTML rendering) by Vaughan Pratt has a lot of theory, theorems and proofs, is somewhat philosophical at times, and spends quite some time dealing with problems of its time (1973). Of course, as an aca