Hacker News new | past | comments | ask | show | jobs | submit login

Take a look at "Parsing expressions by precedence climbing"[1] by Eli Bendersky.

See the "Other resources" section for other approaches to this problem.

1: https://eli.thegreenplace.net/2012/08/02/parsing-expressions...




1) Like the original article, this leaves unary operators as an exercise for the reader (though it does note so explicitly and provides a small hint)

2) This looks more like Pratt parsing vs. the approach described in the article

3) I was asking the original author




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: