Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wrote a shift-reduce parser for a minimalistic C-like language where the grammar is entirely specified as a static table. The precedence rules are resolved through a "should_shift" function where the parser asks whether it should perform the reduction for a matched rule, or shift one token more:

https://github.com/bbu/simple-interpreter



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

Search: