Resources for writing a recursive descent parser by hand

蓝咒 提交于 2019-12-03 12:13:05

问题


I'm looking to write a recursive descent parser by hand and I'm looking for good resources on how to structure it, algorithms, etc.


回答1:


There is a good tutorial on codeproject under "Compiler Patterns". Lately, you can even just Google "compiler patterns".

http://www.codeproject.com/Articles/286121/Compiler-Patterns

The article covers most aspects of building a simple compiler (the back-end, the BNF, and the patterns used to implement the various BNF rules), but is not very heavy on theory, or even on why a recursive descent compiler works to convert language input into code.




回答2:


I can suggest "Crafting a Compiler" by Charles N. Fischer and Richard J. LeBlanc.

Edit. This is an updated version: http://www.amazon.com/Crafting-Compiler-Charles-N-Fischer/dp/0136067050/ref=sr_1_2?ie=UTF8&s=books&qid=1258514561&sr=8-2



来源:https://stackoverflow.com/questions/1753407/resources-for-writing-a-recursive-descent-parser-by-hand

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!