As someone who worked on parsers it's kind of interesting that you picked this particular version of a parsing problem b/c it involves operator precedence, which introduces a fair bit of complexity. The "canonical" solution to operator precedence is Pratt parsing, a variation of which is used in my language parsers. I also just find that algorithm neat, conceptually. But it is kind of hard to wrap your mind around it b/c of its generality.
Two things about parsers, focusing on Pratt parsers, that I have enjoyed
- http://journal.stuffwithstuff.com/2011/03/19/pratt-parsers-expression-parsing-made-easy/
- https://matklad.github.io/2020/04/13/simple-but-powerful-pratt-parsing.html
The latter is where I learned how to do Pratt parsing. The former is just a generally very very good blog about PL stuff.