background preloader

Compiler

Facebook Twitter

LtU: Purpose and Policies. Contents Purpose Lambda the Ultimate (LtU) is a weblog dedicated to the study of general properties of programming languages, with an emphasis on programming language research and theory.

LtU: Purpose and Policies

The central focus of the site are the links to programming language related papers, articles, projects, and related news, which are posted to the home page by contributing editors. These items are intended to be discussed in the comments section associated with each item. LtU also provides a discussion forum, which is for use by regular members to raise and discuss relevant topics that they think may be of interest to the LtU community. LtU is foremost a place to learn and exchange ideas. Your contributions are welcome, subject to the policies described below. Note that these policies were developed mainly to help new members understand the site, and to help maintain a high quality of discussion. LtU has a large and vibrant community, with diverse interests and skills. Site Policies. T3X.ORG. (How to Write a (Lisp) Interpreter (in Python)) Syntax and Semantics of the Lispy Scheme Subset The syntax of a language is what it looks like; the semantics is what it means.

(How to Write a (Lisp) Interpreter (in Python))

For example, in the language of mathematical expressions, the syntax for adding two plus two is "2 + 2" and the semantics of that expression is the number four. We say we are evaluating a syntactic expression when we determine its semantic referent; we would say that "2 + 2" evaluates to 4, and write that as "2 + 2" ⇒ 4. Most computer languages have a variety of syntactic conventions (keywords, infix operators, brackets, operator precedence, dot notation, semicolons, etc.), but as a member of the Lisp family of languages, all of Scheme's syntax is based on lists in parenthesized prefix notation.

This may seem unfamiliar, but it has the virtues of simplicity and consistency. Note that the exclamation mark is not a special character in Scheme; it is just part of the name "set! ". Bob: a Scheme interpreter, compiler, and VM in Python. November 6th, 2010 at 2:55 pm Bob is my latest hobby project.

Bob: a Scheme interpreter, compiler, and VM in Python

It’s a suite of implementations of the Scheme language in Python. It currently includes: A Scheme interpreterAn implementation of a stack-based virtual machine called the "Bob VM"A compiler from Scheme to Bob VM bytecodeA serializer and deserializer for Bob VM bytecode. 汗牛充栋的编译器参考资料. Peter.michaux.ca - Scheme from Scratch - Introduction. The design and implementation of programming languages fascinates me.

peter.michaux.ca - Scheme from Scratch - Introduction

A programming language enables a text file to both accurately communicate to another person a problem’s solution and control a computer’s execution. The influence a language’s feature set has on the way a programmer thinks about problems and their solutions is an endlessly captivating idea. The world of programming languages is amazing. I’m particularly interested in implementing higher-level languages in lower-level languages.

I think I was attracted to Math in school because the construction of new ideas based on a small set of axioms seems like good, clear thinking. This article may be the first of many recording the scratching of an itch that apparently needs scratching. Prerequisites This exploration is not for novice programmers. You have experience programming on a UNIX or UNIX-like system. You have some prior exposure to Intel 386 Assembly language. “Scheme” There are many versions of “Scheme”. Write Yourself a Scheme in 48 hours. By Jonathan Tang.

Write Yourself a Scheme in 48 hours

Rethinking Compiler Design. The Compiler Experiment Begins. Dave Beazley's mondo computer blog. [ January 13, 2012 Update: There are still a few seats left in the compilers class for January 17-20, 2012.

The Compiler Experiment Begins

More details here. In the spring of 1995, I took a course on compiler design. I think the great thing about compilers was how it simply tied so many topics together all in one place. In 2001, I had an opportunity to revisit the topic of compilers. Fast forward 11 years. Write a Compiler (in Python) So, today is the first day of another compiler experiment. Lexing and tokenizing.Parsing and parse trees.Type checking.Intermediate code generation.Simple optimization (constant folding, etc.).RelationsControl flowFunctionsOutput code in RPython (from the PyPy project) One interesting thing about using Python for such a project is that you can use the internals of Python itself to explore important concepts. Or, if you want to look at how Python makes an AST: Or, if you want to see what kind of code Python generates: Follow the Project.

使用Flex Bison 和LLVM编写自己的编译器.