Angel \”Java\” Lopez on Blog

November 28, 2014

SimpleScript (3) The Parser, Expressions and Commands

Previos Post

Let’s visit the Parser, that is a separated module. It starts with a simple declaration:

'use strict';

var lexer;

if (typeof lexer == 'undefined')
    lexer = require('./lexer');

var parser = (function () {
    var TokenType = lexer.TokenType;
    var binoperators = [ "+", "-", "*", "/", "==", "!=", "<", ">", "<=", ">=" ];

It uses and requires the lexer module. After this declaration, there are many expressions and commands. This is the expression “class” for a name (ie, foo):

function NameExpression(name) {
    this.isLeftValue = true;

    this.compile = function () {
        return name;
    };

    this.getName = function () {
        return name;
    }

    this.collectContext = function (context) {
        context.declare(name);
    }
}

In an upcoming post, I will describe the detection and construction of commands and expression. An expression should implement two methods: compile, that returns an string with the compiled JavaScript code associated to the expression, and collectContext, that allows the discover of used variables in an expression/command. In the above code, NameExpression declares its name to a context, an object that is recovering the used variables.

This is an IndexedExpression, composed by an expression and another one for the index (it’s like foo[42+1]):

function IndexedExpression(expr, indexpr) {
    this.isLeftValue = true;

    this.compile = function () {
        return expr.compile() + '[' + indexpr.compile() + ']';
    };

    this.collectContext = function (context) {
        expr.collectContext(context);
    }
}

The collectContext visits the internal expression (I could add the visit of the index expression, too).

There are commands, like IfCommand:

function IfCommand(cond, thencmd, elsecmd) {
    this.compile = function () {
        var code = 'if (' + cond.compile() + ') { ' + thencmd.compile() + ' }';
        if (elsecmd)
            code += ' else { ' + elsecmd.compile() + ' }';
        return code;
    };

    this.collectContext = function (context) {
        cond.collectContext(context);
        thencmd.collectContext(context);
        if (elsecmd)
            elsecmd.collectContext(context);
    }
}

The distinction between commands and expressions is a formal one. Again, a command should implement compile and collectContext. The above code generates a JavaScript if command.

As usual, I followed TDD (Test-Driven Development) workflow. Partial tests example:

exports['Compile string without quotes inside'] = function (test) {
    test.equal(compileExpression("'foo'", test), "'foo'");
    test.equal(compileExpression('"foo"', test), "'foo'");
}

exports['Compile name'] = function (test) {
    test.equal(compileExpression("foo", test), "foo");
}

exports['Qualified name'] = function (test) {
    test.equal(compileExpression("foo.bar", test), "foo.bar");
}

exports['Indexed term'] = function (test) {
    test.equal(compileExpression("foo[bar]", test), "foo[bar]");
}

Remember: No TDD, no paradise! 😉

Next topics: how to recognize and build expressions and commands.

Stay tuned!

Angel “Java” Lopez

http://www.ajlopez.com

http://twitter.com/ajlopez

November 11, 2014

SimpleScript (2) The Lexer

Previous Post
Next Post

These days, I was working improving my SimpleScript compiler to JavaScript. Today, I want to comment the implementation of the lexer, the repo is

http://github.com/ajlopez/SimpleScript

Now, the lexer code resides in a dedicated file lib/lexer.js, that expose a module, that can be consumed from Node.js and from the browser. It starts defining the token types:

var lexer = (function () {
    var TokenType = { 
        Name: 1, 
        Integer: 2, 
        Real: 3, 
        String: 4, 
        NewLine: 5, 
        Separator: 6, 
        Assignment: 7 };

Then, it defines some operatores, delimiters, and the Token, with two elements, type and value.

var separators = ".,()[]";
var assignments = ["=", "+=", "-=", "*=", "/="];
var operators = ["+", "-", "*", "/", "==", "!=", "<", ">", "<=", ">="];

function Token(value, type) {
    this.value = value;
    this.type = type;
}

The main job is in the Lexer “class”, with the method nextToken:

function Lexer(text) {
    var length = text ? text.length : 0;
    var position = 0;
    var next = [];

    this.nextToken = function () {
        if (next.length > 0)
            return next.pop();

        skipSpaces();

        var ch = nextChar();

        if (ch === null)
            return null;

        if (ch === '"' || ch === "'")
            return nextString(ch);

        if (ch === '\n')
            return new Token(ch, TokenType.NewLine);

        if (ch === '\r') {
            var ch2 = nextChar();

            if (ch2 === '\n')
                return new Token(ch + ch2, TokenType.NewLine);

            if (ch2)
                pushChar(ch2);

            return new Token(ch, TokenType.NewLine);
        }

        if (isAssignment(ch))
            return new Token(ch, TokenType.Assignment);

        if (isOperator(ch))
            return nextOperator(ch);

        if (isSeparator(ch))
            return new Token(ch, TokenType.Separator);

        if (isFirstCharOfName(ch))
            return nextName(ch);

        if (isDigit(ch))
            return nextInteger(ch);
    }

Finally, the module expose a lexer factory and the enumeration of token types:

return {
    lexer: function (text) { return new Lexer(text); },
    TokenType: TokenType
}

The code was developed using Test-Driven Development workflow. There is a file test/lexer.js, fragment:

function getToken(text, value, type, test) {
    var lexer = sslexer.lexer(text);
    var token = lexer.nextToken();
    test.ok(token);
    test.equal(token.value, value);
    test.equal(token.type, type);
    test.equal(lexer.nextToken(), null);
};

exports['Get names'] = function (test) {
    getToken('foo', 'foo', TokenType.Name, test);
    getToken('foo123', 'foo123', TokenType.Name, test);
    getToken('foo_123', 'foo_123', TokenType.Name, test);
    getToken('_foo', '_foo', TokenType.Name, test);
}

exports['Get integer'] = function (test) {
    getToken('123', '123', TokenType.Integer, test);
    getToken('1234567890', '1234567890', TokenType.Integer, test);
}

Remember: no TDD, no paradise 😉

Next topics: the parser, commands and expressions implementations, compilation to JavaScript.

Stay tuned!

Angel “Java” Lopez

http://www.ajlopez.com

http://twitter.com/ajlopez

January 12, 2013

Code Katas in JavaScript/Node.js using TDD

These past weeks, I was working in JavaScript/Node.js modules, using TDD at each step. Practice, practice, practice, the journey to mastery.

You can see my progress, reviewing the commits I did at each new test. This is a summary of that work:

CobolScript: See my posts, an implementation of COBOL as a compiler to JavaScript, having console program samples, dynamic web pages and access to Node.js modules. See web sample, using MySQL, and SimpleWeb.

SimplePipes: A way to define message-passing using ‘pipes’ to connect different defined nodes/functions. I want to extend it to have distributed process.

SimpleBoggle: Boggle solver, it is better than me! See console sample.

SimpleMemolap: Multidimensional OLAP-like processing, with in-memory model, and SimpleWeb site see sample:

SimpleChess: Work in progress, define a board using SimpleBoard, and make moves. I’m working on SimpleGo, too, to have a board, game, and evaluators.

SimpleRules: forward-chaing rule engine. I should add rule compilation to JavaScript. The engine works a la Rete-2, detecting the changes in the current state, and triggering actions.

SimpleScript: see post, my simple language, compiled to JavaScript. See posts. WIP.

Py2Script: Python language compiler to JavaScript, first step. WIP.

SimpleWeb: web middleware, a la Connect, with web sample.

BasicScript: My first steps to compile Basic to JavaScript. I want to use it to program and compile a game.

SimplePermissions: Today code kata. It implements subjects, roles, and permissions, granted by context.

SimpleFunc: Serialization of functions.

SimpleMapReduce: Exploring the implementation of a Map-Reduce algorithm.

SimpleTuring: Turing machine implentation.

Cellular: Cellular automata implementation, including a Game of Life console sample.

I will work on:

NodeDelicious: To retrieve my links from my Delicious account, now the site was revamped and no more pagination.

SimpleDatabase: In-memory database, maybe I will add file persistence.

SimpleSudoku: Rewrite of my AjSudoku solver, from scratch.

I’m having a lot of fun, as usual 😉

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

January 2, 2013

SimpleScript (1) First ideas

The latest two week, I was busy writing CobolScript, my COBOL compiler to JavaScript (see my posts). I have console sample programs, and dynamic pages samples running on Node.js (see samples). The web samples are using the simple http node.js module, or my new SimpleWeb module, a simple middleware layer a la Connect. I started to write a Python to JavaScript compiler, see Py2Script, too. But now, after those training projecs (my first ones that are compiling to JavaScript using JavaScript), I want to push the envelope and write a simple script compiler, I named SimpleScript (see repo).

The key points:

– It compiles to JavaScript, so, it’s JavaScript-oriented. It’s not a script language to be implemented in different technologies (.NET, Java, JavaScript). It’s totally oriented to JavaScript semantic.

– I love C programming language tradition, but this time, I want no semicolons and curly braces. I want a syntax more Python/Ruby oriented.

– No indentation “hell”. Ok, I like Python, but indentation as part of the syntax, it’s not my preferred way.

– No command separator (no semicolon or something else) except new line or syntax. That is, I could write

if a < 1 a = 1

or

if a < 1
   a = 1
end

Notice the use of end.

You CANNOT write (semicolon is not a separator):

if a < 1 a=1; b=2

You MUST write:

if a < 1
  a = 1
  b = 2
end

– No parenthesis around conditions (see the above if example).

– Only for … in , to be discussed. I want to have for-in as in JavaScript, but with some variant to access directly the values instead the names/indexes of an object or array. Something like

for k in myarray

iterates over myarray indexes.

for k in myarray values

iterates over myarray values, directly. Range expression will be supported:

for k in 0..n

– Loops with continue, break. The main loop construction is the while.

– Functions as first class citizens.

function keyword will be used to define anonymous functions. Maybe (to be discussed) I will use define keyword to define named functions.

– Function invocation with explicit parenthesis (forget Ruby convention, go for something like Python 3.x).

– Array access with [] (forget Basic programming convention of using parenthesis).

– External variables. I learnt this from my CobolScript work: the linkage section is useful. An external variable is something injected at runtime (not a global one), and it can be provided in the call to the program. For example, print function could be an external one, so the calling program could redirect the print to the console, or to a buffer or to the web response. at will.

– Global variables should be declared explicitly. All non-declared variable is considered local (to the function, unit where it is used).

– Functions has closures as in JavaScript. In contrast, AFAIK, Python use explicit declaration to access outer variables in a function. I like JavaScript automatic access to outer variables, so I will keep it.

– Async constructions. I added this to CobolScript, and I found it useful. It’s something like the await/async in C# 5.0

– Run on the browser and on Node.js.

– Class support: to be discussed (the only key use case I have, is the game client coding for my game project).

I know, there are other implementations, like CofeeScript. But I want to training me, on JavaScript, Node.js and TDD.

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

July 11, 2012

Compilers: Links, News And Resources (4)

Filed under: Compilers, Links, Programming Languages — ajlopez @ 9:02 pm

Previous Post

Compiling Ruby: From Text to Bytecode
http://www.engineyard.com/blog/2009/the-anatomy-of-a-ruby-jit-compile/

The Ludicrous JIT Compiler
http://rubystuff.org/ludicrous/
Ludicrous is a just-in-time compiler for Ruby 1.8 and 1.9. Though still in the experimental stage, its performance is roughly on par with YARV

closure-compiler
http://code.google.com/p/closure-compiler/wiki/SourceMaps

cl-dcf
http://code.google.com/p/cl-dcf/
Common Lisp DSL Compiler Framework

What are the available tools to compile .NET projects to standalone native binaries?
http://stackoverflow.com/questions/1240334/what-are-the-available-tools-to-compile-net-projects-to-standalone-native-binar

takeoutweight / clojure-scheme
https://github.com/takeoutweight/clojure-scheme
Clojure to Scheme to C to the bare metal.

Introducing C# To Go: a C# Compiler for Android
http://www.gregshackles.com/2011/07/introducing-c-to-go-a-c-compiler-for-android/

The Julia Language
http://julialang.org/
Julia is a high-level, high-performance dynamic programming language for technical computing, with syntax that is familiar to users of other technical computing environments. It provides a sophisticated compiler, distributed parallel execution, numerical accuracy, and an extensive mathematical function library. …
Julia’s LLVM-based just-in-time (JIT) compiler combined with the language’s design allow it to approach and often match the performance of C/C++….

Vala – Compiler for the GObject type system
https://live.gnome.org/Vala

Quick fun with Mono’s CSharp compiler as a service
http://blog.davidebbo.com/2012/02/quick-fun-with-monos-csharp-compiler-as.html

dodo / node-dt-compiler
https://github.com/dodo/node-dt-compiler
Δt compiler – async & dynamic templating engine compiler

Universal Cobol Compiler
http://sourceforge.net/projects/universalcobol/

COB2J
http://www.mpsinc.com/cob2j.html

Lispm archaeology: Compiler Protocols
http://ahefner.livejournal.com/19280.html

Outlet gets a Personality
http://jlongster.com/2012/01/16/outlet-gets-a-personality.html
If you haven’t been following, Outlet is a project I’ve been working on that compiles a Scheme-inspired language to javascript and other languages.

A guide to the CHICKEN compilation process
http://wiki.call-cc.org/chicken-compilation-process
This document describes the compilation process used by the CHICKEN Scheme to C compiler by explaining the different compilation stages on a simple example program.

Free APL Interpreters and Compilers
http://www.thefreecountry.com/compilers/apl.shtml

facebook / hiphop-php
https://github.com/facebook/hiphop-php
Source code transformer from PHP to C++

Chicken
http://www.call-cc.org/
CHICKEN is a compiler for the Scheme programming language. CHICKEN produces portable, efficient C, supports almost all of the R5RS Scheme language standard, and includes many enhancements and extensions. CHICKEN runs on Linux, MacOS X, Windows, and many Unix flavours.

The Impact of Optional Type Information
on JIT Compilation of Dynamically Typed Languages
http://www.masonchang.com/storage/papers/dls05-chang.pdf

PyPy, Tutorial Part 2: Adding a JIT
http://morepypy.blogspot.com.ar/2011/04/tutorial-part-2-adding-jit.html

mherkender / lua.js
https://github.com/mherkender/lua.js
An ECMAscript framework to compile and run Lua code, allowing Lua to run in a browser or in Flash

Parsing expression grammar
http://en.wikipedia.org/wiki/Parsing_expression_grammar

My Links
http://delicious.com/ajlopez/compiler

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

May 28, 2012

Compilers: Links, News And Resources (3)

Filed under: Compilers, Links, Programming Languages — ajlopez @ 6:13 pm

Previous Post
Next Post

More links about compiler implementations, ideas, interpreters, and programming languages:

Pharo Opal Compiler
http://www.slideshare.net/jressia/opal-compiler

Microsoft’s Roslyn: Reinventing the compiler as we know it
http://www.infoworld.com/d/application-development/microsofts-roslyn-reinventing-the-compiler-we-know-it-176671

Roslyn CTP Now Available
http://blogs.msdn.com/b/somasegar/archive/2011/10/19/roslyn-ctp-available-now.aspx

Why Clojure Doesn’t Need Invokedynamic (Unless You Want It to be More Awesome)
http://blog.headius.com/2011/10/why-clojure-doesnt-need-invokedynamic.html

C#5 and Meta-Programming
http://codebetter.com/patricksmacchia/2010/05/31/c-5-and-meta-programming/

Roslyn: Compiler as a Service, not a black-box anymore!
http://www.codequake.com/post/2011/09/16/Roslyn-Compiler-as-a-Service-not-a-black-box-anymore!.aspx

Project Roslyn or Compiler-as-a-Service. Bringing flexibility of dynamic languages to C#
http://blog.softelegance.com/net/project-roslyn-or-compiler-as-a-service-bringing-flexibility-of-dynamic-languages-to-c/

Microsoft previews Compiler-as-a-Service software
http://www.computerworld.com/s/article/9220056/Microsoft_previews_Compiler_as_a_Service_software

oscompiler
http://code.google.com/p/oscompiler/
O# (managed Objective-C) Compiler (requires .NET 4)

Microsoft previews Compiler-as-a-Service software
http://www.techworld.com.au/article/401071/microsoft_previews_compiler-as-a-service_software/#closeme

GNU Objective-C runtime features
http://gcc.gnu.org/onlinedocs/gcc-3.2.3/gcc/Objective-C.html

An Introduction to Objective-C for .NET Programmers
http://www.qckapp.com/index.html?p=ObjC

Opa – a unified approach to web programming
http://www.i-programmer.info/news/98-languages/2961-opa-a-unified-approach-to-web-programming.html
Opa is a new open source language that lets you write an app and compile it to a JavaScript application on the client, complete with server-side support including a database.

Clojure, JVM 7 support (invokedynamic)
https://groups.google.com/group/clojure/msg/dd82cc60855b1ca3

RES – An Open Cobol To Java Translato
http://sourceforge.net/projects/opencobol2java/

Making Ruby Fast: The Rubinius JIT
http://www.engineyard.com/blog/2010/making-ruby-fast-the-rubinius-jit/
by @dseminara

Introducing ClojureScript
http://clojure.com/blog/2011/07/22/introducing-clojurescript.html
by @stuartsierra

ClojureScript Rationale
https://github.com/clojure/clojurescript/blob/master/devnotes/cljs.org
by @stuarthalloway

Compiling Clojure to Javascript pt. 1 of n
http://blog.fogus.me/2011/07/21/compiling-clojure-to-javascript-pt1/
by @fogus

Scala comes to .Net
http://www.scala-lang.org/node/10299
Miguel Garcia, part of the Scala group at EPFL, has been striving to make the Scala productivity available to .Net developers too. In a project funded by Microsoft, he has now reached a major milestone in delivering that capability.

List of languages that compile to JS
https://github.com/jashkenas/coffee-script/wiki/List-of-languages-that-compile-to-JS

Ferret: An Experimental Clojure Compiler
http://nakkaya.com/2011/06/29/ferret-an-experimental-clojure-compiler/

Precompile your MVC Razor views using RazorGenerator
http://blog.davidebbo.com/2011/06/precompile-your-mvc-views-using.html

Razor Generator
http://razorgenerator.codeplex.com/

My Links
http://delicious.com/ajlopez/compiler

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

May 24, 2012

Compilers: Links, News And Resources (2)

Filed under: Compilers, Links, Programming Languages — ajlopez @ 7:22 pm

Previous Post
Next Post

More links about compiler implementations, ideas and technologies:

jitasm
http://code.google.com/p/jitasm/
jitasm is C++ library for runtime code generation of x86/x64. You can write the code like a inline assembler.

Compiling Scala to LLVM
https://days2011.scala-lang.org/sites/days2011/files/ws3-2-scalallvm.pdf

Groovy Goodness: Add AST Transformations Transparently to Scripts
http://mrhaki.blogspot.com.ar/2011/06/groovy-goodness-add-asttransformations.html
With Groovy 1.8 we can add compilation customizers when for example we want to run a Groovy script from our application code.

Jabaco
http://www.jabaco.org/
Jabaco is a simple programming language with a Visual Basic like syntax. Jabaco enables you to create powerful software for all Java supported operating systems.

How To Write a Console Application in PowerShell with Add-Type
http://blogs.msdn.com/b/powershell/archive/2009/01/03/how-to-write-a-console-application-in-powershell-with-add-type.aspx

Type inference
http://en.wikipedia.org/wiki/Type_inference
Type inference refers to the automatic deduction of the type of an expression in a programming language. If some, but not all, type annotations are already present it is referred to as type reconstruction.

LLVM Language Reference Manual
http://llvm.org/docs/LangRef.html

AntLr LLVM
http://www.antlr.org/wiki/display/ANTLR3/LLVM
Example of how to use ANTLR+StringTemplate with LLVM to build a compiler.

Implementing the virtual method pattern in C#, Part Two
http://blogs.msdn.com/b/ericlippert/archive/2011/03/21/implementing-the-virtual-method-pattern-in-c-part-two.aspx

XmlVm
http://xmlvm.org/overview/
The goal of XMLVM is to offer a flexible and extensible cross-compiler toolchain. Instead of cross-compiling on a source code level, XMLVM cross-compiles byte code instructions from Sun Microsystem’s virtual machine and Microsoft’s Common Language Runtime.

Engineering a Compiler, 2nd Edition
http://store.elsevier.com/product.jsp?isbn=9780120884780

Implementing Smalltalk’s Non-Local Returns in JavaScript
http://silversmalltalk.wordpress.com/2011/02/02/implementing-smalltalks-non-local-returns-in-javascript/

Smalltalk Classes in JavaScript
http://silversmalltalk.wordpress.com/2011/02/02/smalltalk-classes-in-javascript/

A Linux Compiler Deathmatch: GCC, LLVM, DragonEgg, Open64, Etc…
http://www.phoronix.com/scan.php?page=article&item=linux_compiler_deathmatch&num=1

Pharen: Lisp -> PHP
http://scriptor.github.com/pharen/index.html
Pharen is a compiler that takes a Lisp-like language and turns it into PHP code. This combines Lisp’s advantages of uniform syntax and homoiconicity (among others) and PHP’s advantage of…being everywhere.

clojurejs — a Clojure (subset) to Javascript translator
http://cynojure.posterous.com/clojurejs-a-clojure-subset-to-javascript-tran

timcameronryan / mug
https://github.com/timcameronryan/mug
A self-hosted JavaScript compiler for the JVM. Written in CoffeeScript

Mono’s C# Compiler as a Service on Windows.
http://tirania.org/blog/archive/2010/Apr-27.html

Smalltalk in small talks: The Setup
http://blog.redline.st/2010/12/15/smalltalk-in-small-talks-the-setup/
Smalltalk in Java

Xbase interactive programming environment
http://sebastianbenz.de/introducing-an-interactive-programming-enviro
One of the exciting new features of the upcoming Xtext 2.0 is the integration of the general purpose expression language Xbase.

Compiler in Clojure
http://dev.clojure.org/display/design/Compiler+in+Clojure
The Clojure compiler is currently a large Java class. Writing it in Clojure will produce many benefits

jarpiain / cljc
https://github.com/jarpiain/cljc
A clojure port of the clojure compiler

Inside Razor – Part 3 – Templates
http://vibrantcode.com/blog/2010/8/2/inside-razor-part-3-templates.html

My Links
http://delicious.com/ajlopez/compiler

More links about interpreters, compilers and programming languages are coming.

Keep tuned!

Angel “Java” Lopez
http://www.ajlopez.com
http://twitter.com/ajlopez

May 22, 2012

Compilers: Links, News and Resources (1)

Filed under: Compilers, Links, Programming Languages — ajlopez @ 10:25 am

Next Post

Since the late seventies, I am a programming language geek. I remember my first contact with COBOL, Fortran, Algol/W, assembly language for mainframes and BCPL. In recent years, I was studying new languages implementations, in the form of interpreter, virtual machine and compilers. This is part of the links I found interesting in the last years.

CrossNet
http://crossnet.codeplex.com/
It parses .NET assemblies and generates unmanaged C++ code that can be compiled on any standard C++ compiler.

Mono CSharp Compiler
http://www.mono-project.com/CSharp_Compiler
The Mono C# compiler is considered feature complete for C# 1.0, C# 2.0, C# 3.0 and C# 4.0 (ECMA).

Bytecode 2011
http://software.imdea.org/~pierreganty/bytecode2011/

Write A Template Compiler For Erlang
http://evanmiller.org/write-a-template-compiler-for-erlang.html

alvaroc1 / s2js
https://github.com/alvaroc1/s2js
Scala to Javascript compiler

Clojure Faster than Machine Code?
http://www.learningclojure.com/2010/09/clojure-faster-than-machine-code.html

Clojure++
http://combinate.us/clojure/2010/09/27/clojure/

On FaceBook’s Thrift semantics, code generation, and OCaml
http://lionet.info/asn1c/blog/2010/07/18/thrift-semantics/

pseudo-language
http://code.google.com/p/pseudo-language/

talc
http://code.google.com/p/talc/

Introduction to GOLD Parser
http://www.codeproject.com/Articles/10492/Introduction-to-GOLD-Parser

Antlr
http://www.antlr.org/

Irony – .NET Language Implementation Kit
http://irony.codeplex.com/
Irony is a development kit for implementing languages on .NET platform. Unlike most existing yacc/lex-style solutions Irony does not employ any scanner or parser code generation from grammar specifications written in a specialized meta-language. In Irony the target language grammar is coded directly in c# using operator overloading to express grammar constructs.

Interpreter and Compiler
http://www.pasteur.fr/formation/infobio/python/ch05s02.html

Compiling .NET code on-the-fly
http://www.codeproject.com/Articles/5472/Compiling-NET-code-on-the-fly

Dynamic Creation of Assemblies/Apps
http://www.codeproject.com/Articles/23227/Dynamic-Creation-of-Assemblies-Apps

NScript – A script host for C#/VB.NET/JScript.NET
http://www.codeproject.com/Articles/3207/NScript-A-script-host-for-C-VB-NET-JScript-NET
NScript is a tool similar to WScript except that it allows scripts to be written in .NET languages such as C#, VB.NET and JScript.NET. NScript automatically compiles the code into an assembly in memory and executes the assembly.

CodeDom Assistant
http://www.codeproject.com/Articles/20597/CodeDom-Assistant
Generating CodeDom Code By Parsing C# or VB

Building .NET Assemblies Dynamically
http://www.csharpfriends.com/articles/getarticle.aspx?articleid=118

A Simple Compiler for the Common Language Runtime
http://www.codeproject.com/Articles/4082/A-Simple-Compiler-for-the-Common-Language-Runtime
An end-to-end example of a bottom up LALR(1) compiler for a fictitious language targeting the Common Language Runtime

Clojure COmpilation
http://clojure.org/compilation
Ahead-of-time Compilation and Class Generation

he Lisp Before the End of My Lifetime
http://metalinguist.wordpress.com/2007/08/04/the-lisp-before-the-end-of-my-lifetime/

Hydrating Objects With Expression Trees – Part I
http://weblogs.asp.net/paulomorgado/archive/2010/08/16/hydrating-objects-with-expression-trees-part-i.aspx

Mastering Expression Trees With .NET Reflector
http://msmvps.com/blogs/paulomorgado/archive/2010/08/06/mastering-expression-trees-with-net-reflector.aspx

Dumping Objects Using Expression Trees
http://msmvps.com/blogs/paulomorgado/archive/2010/08/03/dumping-objects-using-expression-trees.aspx

Solving the Expression Problem with OOP
http://www.atalasoft.com/cs/blogs/stevehawley/archive/2010/08/12/solving-the-expression-problem-with-oop.aspx

C# compiler as a service
http://weblogs.asp.net/britchie/archive/2010/08/08/c-compiler-as-a-service.aspx

Chicken
http://wiki.call-cc.org/
Chicken is an implementation of the Scheme programming language that can compile Scheme programs to C code as well as interpret them.

Steel Bank Common Lisp
http://www.sbcl.org/
Steel Bank Common Lisp (SBCL) is a high performance Common Lisp compiler

Scheme2Js
http://www-sop.inria.fr/indes/scheme2js/
Scheme2Js is a Scheme to JavaScript compiler

Comparing SPUR to PyPy
http://morepypy.blogspot.com.ar/2010/07/comparing-spur-to-pypy.html

SPUR: A Trace-Based JIT Compiler for CIL
http://research.microsoft.com/en-us/projects/spur/

chandlerkent / HKCD
https://github.com/chandlerkent/HKCD
MiniJava compiler for RHIT compilers course (CSSE 404)

Google Closure Compiler Advanced mode
http://axod.blogspot.com.ar/2010/01/google-closure-compiler-advanced-mode.html

free pascal
http://www.freepascal.org/
Free Pascal (aka FPK Pascal) is a 32 and 64 bit professional Pascal compiler.

VMKit: a substrate for virtual machines
http://vmkit.llvm.org/
The VMKit project is a framework for building virtual machines. It uses LLVM for compiling and optimizing high-level languages to machine code, and MMTk to manage memory.

Hello from a libc-free world! (Part 1)
https://blogs.oracle.com/ksplice/entry/hello_from_a_libc_free

My Links
http://delicious.com/ajlopez/compiler

Create a free website or blog at WordPress.com.