PLT 板


LINE

看板 PLT  RSS
※ [本文轉錄自 CSSE 看板 #1C2I3W9h ] 作者: dryman (dryman) 看板: CSSE 標題: [閒聊] a scheme intermpreter writen in Perl 時間: Fri Jun 4 23:50:50 2010 http://billhails.net/Book/front.html 還蠻有趣的~ 有些 Lisp 的語法之前都沒玩過XD 目錄 Part 1 Implementing a Scheme-Like Interpreter Chapter 1 Introduction 1.1 Why Perl? 1.2 Why Scheme? 1.3 References 1.4 Typography 1.5 A Note on the Interpreter Versions Chapter 2 An Introduction to PScheme 2.1 PScheme Syntax 2.2 Simple Expressions 2.3 Conditionals 2.4 Global Variables 2.5 Functions 2.6 Local Variables Chapter 3 Interpreter Version 0.0.0 3.1 The Read-Eval-Print Loop 3.2 The Environment 3.3 The Reader 3.4 PScheme Expressions 3.5 Evaluation 3.5.1 Evaluation of Literals 3.5.2 Evaluation of Symbols 3.5.3 Evaluation of Lists 3.6 Primitive Operations 3.7 Special Forms 3.8 Output 3.9 Summary 3.10 Tests Chapter 4 Implementing let 4.1 The Environment 4.1.1 A Stack-based Environment 4.1.2 A Linked List Environment 4.2 Global Environments have a Problem 4.3 Environment Passing 4.4 let Itself 4.5 Summary 4.6 Tests Chapter 5 Implementing lambda 5.1 lambda 5.2 Evaluating a Closure 5.3 Printing a Closure 5.4 Summary 5.5 Tests Chapter 6 Recursion and letrec 6.1 letrec 6.1.1 Assignment 6.1.2 PSCM::LetRec itself 6.2 Summary 6.3 Tests Chapter 7 Another Variation on let 7.1 Sequential Binding 7.2 let* 7.3 Summary 7.4 Tests Chapter 8 List Processing 8.1 quote 8.2 list 8.3 car and cdr 8.4 cons 8.4.1 Dot Notation 8.5 Implementation 8.5.1 Changes to Expressions 8.5.2 Changes to Primitives and Special Forms 8.5.3 Changes to Closures 8.5.4 Changes to the Environment 8.5.5 Changes to the Reader 8.6 Summary 8.7 Tests Chapter 9 Macros 9.1 macro 9.2 Evaluating Macros 9.2.1 Trying it out 9.2.2 An Improvement 9.2.3 One Last Addition 9.3 Summary 9.4 Tests Chapter 10 Side Effects 10.1 The Beauty of Functional Languages 10.2 Variable Assignment 10.3 Sequences 10.4 Summary 10.5 Tests Chapter 11 define 11.1 Environment Changes 11.2 The define Special Form 11.3 Persistant Environments 11.4 Tests Chapter 12 Classes and Objects 12.1 Features of this implementation 12.1.1 Inheritance 12.1.2 Class Variables and Methods 12.1.3 super Calls 12.1.4 Feature Summary 12.2 Implementation 12.2.1 Class Creation with make-class 12.2.2 Object Creation 12.2.3 init Method Invocation 12.2.4 General Method Invocation 12.2.5 super Method Invocation 12.2.6 Wiring it up 12.3 Summary and Variations 12.4 Tests Chapter 13 Continuations 13.1 Tail Recursion and Tail Call Optimization 13.2 Continuation Passing Style 13.3 Example CPS Transformations 13.4 The Trampoline 13.5 Using CPS 13.6 Implementation 13.6.1 Our Trampoline Implementation 13.6.2 CPS let and lambda 13.6.3 CPS letrec 13.6.4 CPS let* 13.6.5 CPS List Processing 13.6.6 CPS macro and unquote 13.6.7 CPS Sequences and Assignment 13.6.8 CPS define 13.6.9 CPS OOP 13.7 CPS Without Closures 13.8 CPS Fun 13.8.1 An error Handler 13.8.2 yield 13.9 Summary Chapter 14 Threads 14.1 Variations 14.2 Tests Chapter 15 Better Error Handling 15.1 The Built in error Primitive 15.2 Using the error Builtin for Internal Errors 15.3 Tests Chapter 16 Chronological Backtracking 16.1 Introducing amb 16.2 Examples of amb in Action 16.2.1 The “Liars” Puzzle 16.2.2 Barrels of Fun 16.2.3 Pythagorean Triples 16.2.4 Parsing Natural Language 16.3 Implementing amb 16.3.1 Changes to Continuations 16.3.2 Mechanical Transformations of the Interpreter 16.3.3 Remaining Continuation Changes 16.3.4 amb Itself 16.3.5 Changes to define 16.3.6 Changes to set! 16.3.7 Changes to repl() 16.3.8 Additional Changes 16.4 Support for Testing amb 16.4.1 and and or 16.4.2 Numeric Inequality Tests 16.4.3 eq? 16.4.4 Wiring it up 16.5 Summary and Directions 16.5.1 An Alternative Implementation 16.6 Tests Chapter 17 Unification and Logic Programming 17.1 Logic Programming Examples 17.1.1 Mary and John 17.1.2 J. S. Bach and Family 17.1.3 Appending Lists 17.1.4 Factorial Again 17.1.5 Symbolic Differentiation 17.2 Pattern Matching 17.2.1 A Perl Pattern Matcher 17.3 Unification 17.3.1 A Perl Unifier 17.3.2 Implementing unify in PScheme 17.4 Logic Programming 17.5 More Logic Programming Examples 17.5.1 Parsing (again) 17.5.2 Simplifying Algebraic Expressions 17.6 Summary, Shortcomings and Short-cuts 17.6.1 Functors and Arity 17.6.2 The Cut 17.6.3 Backtracking Efficiency 17.7 Tests Chapter 18 Summary Bibliography Index --



※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.46.31 --



※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.46.31







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:Tech_Job站內搜尋

TOP