《编译原理》阅读笔记:p19-p24

《编译原理》学习第 4 天,p19-p24总结,总计 5 页。

一、技术总结

1.grouping of phases

这里谈到分组(group),那么就会有一个疑问,分组的依据是什么?即根据什么来分组。

(1) front end & back end

编译器包含很多阶段(phase)——lexical analyzer, syntax analyzer, semantic analyzer, intermediate code generator, code optimizer, code generator, 这些阶段可以分为front end和back end两组。这里是根据phase的作用进行分组——“The front end consists of those phases, or parts of phases, that depend primarily on the source language and are largely independent of the target machine”。

(2)pass

可以将多个phase分成一个pass。分组的依据是什么?暂时没有理解,先继续往下读。

2.compiler-construction tools

有哪些tool,这些tool的作用是什么。这里只需要大概了解即可,用到的时候自然会知道。

3.参考文献

本书会在最后Bibliography章节列出所有的参考文献,翻了一下Wexelblat在1981年写的《history if programming languages》,介绍了FORTRAN,LISP,COBOL等编程语言,果然历史久远。

二、其它

p24, Ascribing credit for techniques remains a perilous task。这句话初看不好理解,ascribe: xxx的原因,credit: 赞誉,perilous: 危险的。中译版将“ascribing credit”翻译成“论功”,甚是准确,但是翻译成“为编译技术论功是一项艰难的任务”,却有点生硬,我个人觉得应该将其翻译成“这些编译技术归功于谁?这真不好下结论,因为同一个技术,有时候确实是不同的人都发现了。”

四、参考资料

1. 编程

(1)Alfred V. Aho,Monica S. Lam,Ravi Sethi,Jeffrey D. Ullman,《编译原理(英文版·第1版)》:https://book.douban.com/subject/5416783/

2. 英语

(1)Etymology Dictionary:https://www.etymonline.com

(2) Cambridge Dictionary:https://dictionary.cambridge.org

欢迎搜索及关注:编程人(a_codists)

posted @ 2024-06-25 22:09  codists  阅读(7)  评论(0编辑  收藏  举报