
语言实现模式
Language Implementation Patterns
Terence Parr · 初版 2009 年
18人推荐
27位读者提及
31次提及
为什么值得读
- 直奔代码实操而非耗费大量时间讨论语法理论
- 展示如何将特定文法形式映射为代码控制流
- 为自研语言提供了清晰直观的实现思路
学习构建配置文件读取器、数据读取器、模型驱动代码生成器、源到源翻译器、源代码分析器以及解释器。你不需要具备计算机科学背景——ANTLR的创建者Terence Parr通过将其分解为最常见的设计模式,揭开了语言实现的神秘面纱。你将跟随一个个模式,学习实现自己的计算机语言所需的核心技能。
Hacker News 上怎么说
正在加载完整评论……
“The Pragmatic Bookshelf” 出版社有一本 Terence Parr 写的不错的书,叫《Language Implementation Patterns》(编程语言实现模式)。我觉得这是一本非常完美的编译器入门书,切入角度极为实用。他没有花大篇幅空谈文法,而是直接甩给你几段(Java)代码,带你看看会遇到哪些问题……
There is a nice book by Terence Parr on "The Pragmatic Bookshelf" called "Language Implementation Patterns". I found this to be a perfect introduction to compilers with a very practical point of view. Rather than talking about grammars for ages he dives right into some (java) code and shows you what problems…
……反映了软件开发中的根本问题:市场根本不知道解决现实业务问题真正需要的是什么。++++ 补充一些阅读材料:https://www.amazon.co.uk/Language-Implementation-Patterns-Do... https://www.amazon.co.uk/Definitive-ANTLR-Reference-Domain-S... https://www.amazon.co.uk/yacc-Nutshell-Handbook-Doug-Brown/d... 它们都值得你投入时间去读。
…reflects the fundamental problem in software development of the market's not knowing what's actually needed to solve real business problems. ++++ Edit, some reading material https://www.amazon.co.uk/Language-Implementation-Patterns-Do... https://www.amazon.co.uk/Definitive-ANTLR-Reference-Domain-S... https://www.amazon.co.uk/yacc-Nutshell-Handbook-Doug-Brown/d... They're all worth investing the time in.
如果你对语言设计也感兴趣,我推荐看看:http://www.amazon.com/Language-Implementation-Patterns-Domai... 以及 http://www.amazon.com/Language-Implementation-Patterns-Domai... 另外也有些程序员正在经历设计和实现自己语言的过程……
If you're interested in language design also may I suggest, http://www.amazon.com/Language-Implementation-Patterns-Domai... and http://www.amazon.com/Language-Implementation-Patterns-Domai... There are also some programmers around who are going through the process of designing and implementing their own languages,…
我读了那本书,你猜得没错,它就是那种“21天精通 X”之类的烂书。我去申请退款了。Terence Parr 写的《Language Implementation Patterns》看起来要好得多。
I read the book and your guess was right, it is one of those "Learn X in 21 days" books. I'll ask for a refund. A much better book seems to be Language Implementation Patterns by Terence Parr.
> ANTLR 的作者 Terence Parr 经常把 parsing 比作迷宫。作为学过工程技术但“不是正统 CS 体系”出身的人,我很喜欢 Parr 的《Language Implementation Patterns》这本书 [0],因为它清晰展示了某些特定的文法形式是如何转化为一眼就能认出的代码模式和控制流的。当然不可否认,这本书确实明显偏向 Parr 自己的 ANTLR 项目和 Java 语言……
> Terence Parr, author of ANTLR, often uses the metaphor of parsing as a maze As someone who had a technical but "not real CS" curriculum, I enjoyed Parr's "Language Implementation Patterns" book [0] because it illustrates how certain grammar-forms become recognizable code-patterns and control-flow. Granted, it's definitely got a bent towards Parr's ANTLR project and the Java language,…
《Language Implementation Patterns》[1] 这本书涵盖了 ANTLR 3,作者(也是 ANTLR 的实现者之一)会一步步带你实现越来越有趣的 DSL,直到你基本上搞出了一门编程语言,但他讲得非常……
The book "Language Implementation Patterns"[1] covers ANTLR 3, and the author (who is one of the implementors of ANTLR) walks you through successively more interesting DSLs until you're basically building a programming language, but does it in…