`
文章列表
illustrate how to implement a  lisp interpreter,see pic 1.lexer: lexer read and translate the input string  "(+ 1 2 )"  into tokens.(Pair) 2.parser: parser translate the tokens into AST(abstract syntax tree) 3.evaluator: evaluator evaluate the AST to a result. 4 return the result== ...
   怎样写一个解释器 这是一篇解释器的入门教程。虽然我试图从最基本的原理讲起,尽量让这篇文章不依赖于其它知识,但是这篇教程并不是针对编程的入门知识,所以我假设你已经学会了最基本的 Scheme 和函数式编程。我不是很推崇函数式编程,但它里面确实包含了很重要的一些方法。如果你完全不了解这些,可以读一下 SICP 的第一,二章(或者接下去读 The Little Schemer)。当然你也可以继续读这篇文章,有不懂的地方再去查资料。我在这里也会讲递归和模式匹配的原理。如果你已经了解这些东西,这里的内容也许可以加深你的理解。 解释器是一种简单却又深奥的东西,以至于好多人都不会写,或者自认为会 ...
  (An ((Even Better) Lisp) Interpreter (in Python)) In a previous essay I showed how to write a simple Lisp interpreter in 90 lines of Python: lis.py. In this essay I make the implementation, lispy.py, three times more complicated, but more complete. Each section handles an addition. (1) New data ...
################ Lispy: Scheme Interpreter in Python ## (c) Peter Norvig, 2010-14; See http://norvig.com/lispy.html ################ Types from __future__ import division Symbol = str # A Lisp Symbol is implemented as a Python str List = list # A Lisp List is implement ...
  (How to Write a (Lisp) Interpreter (in Python)) This page has two purposes: to describe how to implement computer language interpreters in general, and in particular to show how to implement a subset of the Scheme dialect of Lisp using Python. I call my language and interpreter Lispy (lis.py). Y ...
---------------------------------the HTML code is :---------------------   <!DOCTYPE html><html lang="en"><head>  <meta charset="utf-8">  <title>Todo List App</title>   <link rel="stylesheet" href="style.css"></h ...
1.we install the prerequitites needed to compile: Code: sudo apt-get install linux-headers-generic build-essential 2.Now we download the package, extract it and install it: Code: wget http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.6/compat-wireless-3.6.6-1-snpc.tar.bz2 ...
海量数据处理系列——BloomFilter 分类: 算法用的基础知识2011-05-02 16:16 573人阅读 评论(0) 收藏 举报
海量数据处理系列——C语言下实现bitmap算法 分类: 算法用的基础知识2011-05-02 13:19 3161人阅读 评论(6) 收藏 举报
eclipse 实用插件
理解HashMap(及hash函数的真正巧妙之处)       〖 作者:annegu 〗〖 大小:2K 〗〖 发布日期:2009-12-03 〗〖 浏览:1 〗   <iframe id="aswift_1" style="left: 0px; position: absolute; top: 0px;" name="aswift_1" frameborder="0" marginwidth="0" marginheight="0 ...

UML类图与类的关系详解

    博客分类:
  • UML
 
UML类图与类的关系详解   2011-04-21 来源:网络   在画类图的时候,理清类和类之间的关系是重点。类的关系有泛化(Generalization)、实现(Realization)、依赖(Dependency)和关联(Association)。其中关联又分为一般关联关系和聚合关系(Aggregation),合成关系(Composition)。下面我们结合实例理解这些关系。 基本概念 类图(Class Diagram): 类图是面向对象系统建模中最常用和最重要的图,是定义其它图的基础。类图主要是用来显示系统中的类、接口以及 ...
Linux下僵尸进程的处理 Category : 工作学习 / Tags : linux / Date : 2010.12.31 / 4,288 views /     什么是僵尸进程   僵尸进程是指它的父进程已经退出(父进程没有等待(调用wait/waitpid)它),而该进程dead之后没有进程接受,就 ...
SQL Injection Prevention Cheat Sheet     Contents  [hide]  1 Introduction 2 Primary Defenses
Preventing SQL Injection in Java     Contents  [hide]  1 Status 2 Overview
Global site tag (gtag.js) - Google Analytics