2 comments

[ 5.3 ms ] story [ 19.3 ms ] thread
This is a repost of an old article about the Sugar parsing library. This parsing technique uses shift/reduce (much like YACC in some ways) and precedence techniques and handles infix, prefix and postfix operators. It also handles confix operators (read the article!)

Overall, a good read, and I'm glad that ProgramMax decided to rehost this article from Douglas Gregor.

Hm. Couldn't you also adapt Dijkstra's Shunting Yard Algorithm?