[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]documentation on how to make a programming language for port

From: Gopal V
Subject: Re: [DotGNU]documentation on how to make a programming language for
Date: Fri, 12 Sep 2003 08:22:46 -0700 (PDT)

--- sho tamashii <address@hidden> wrote:
>      I have a small team that wanted to make a
> language like Ruby, but for the
> platform. Is there any documentation on how to make
> a programming language for
> Perferrabily a dynamic language howto.

There are 2 ways to build a language into

#1) Write a compiler for it , but that's suited for
static languages like Java (which has a compiler in
dotgnu, albiet an incomplete set of java.lang.*
libraries )

#2) Write an interpreter for the language . for
dynamic languages (look at the JScript interpreter
supplied -- jsrun hello.js)

You should be looking at #2 for initial work and 
slowly move on to generating the dynamic code 
and end up with a fast compiled code mixed with 
jumps into the interpreter (For eval() and stuff 
like that) ..... Curiously this is exactly how the
Pnet .NET VM itself is constructed :).( Though that
is a mixture of JIT and interpreter ).

Anyway the current JScript engine should provide some
answers and some questions for you -- like TreeCC ;-)

If you go for a static compiler model , just have
a look at the BrainF*ck compiler I have hacked up
inside pnet/cscc/bf/ for an idea of how Pnet compilers
are built (it's a very very simple example, though).

Attend the weekly meeting tomorrow to discuss the
stuff with the developers themselves (sorry, I will
have to miss this week's meeting).


Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

reply via email to

[Prev in Thread] Current Thread [Next in Thread]