I probably should have noted that I am already familiar with Pratt parsing, which seems like something that isn't actually brain-dead simple and obvious in the same way (which is why it was worth writing a paper about in the 1970s.)
Hoping for a reply from the original author to recommend a simple approach to add unary operators.
i.e: parse_node + parse_peek
When parse_node is an operator you know it is the "-2" in "-2^-2(2+2)" and when parse_peek is the operator it is "-(2+2)" in the same. An example of this:
- https://github.com/thysultan/Ally/blob/8ba0b4de7ab104ceae54d...
2) I was asking the original author for a simple extension to the presented appraoch
See the "Other resources" section for other approaches to this problem.
1: https://eli.thegreenplace.net/2012/08/02/parsing-expressions...
2) This looks more like Pratt parsing vs. the approach described in the article
3) I was asking the original author
I'd like to be able to write expressions like "-2^-(2+2)" or "a cos b + a sin b".
For "-2^-(2+2)" note that exponentiation has higher precedence than negation.