Hacker News new | past | comments | ask | show | jobs | submit login
Shift/Reduce Expression Parsing (p5r.org)
21 points by ProgramMax on Nov 6, 2014 | hide | past | favorite | 2 comments



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?




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

Search: