[Mono-list] C# Compiler can compile hello world!

Alexander Klyubin klyubin@aqris.com
Thu, 6 Sep 2001 08:20:14 +0200

In one of our company's project we use an automated test suite to check
whether parser works. The idea is that during the
development of parser we add more and more (at that time) problematic
projects to the test suite. Doing regression testing is like a snap. To
reiterate, we have a bunch of different projects/files to parse and
automated test suite attempts to parse all of those. Any errors are

Any clues whether there is a point to use similar approach for compiler
development? I never developed compilers, so I don't really know whether
there's much point in doing something like this. My intuition says that
there should be.

Alexander Klyubin

-----Original Message-----
From: mono-list-admin@ximian.com [mailto:mono-list-admin@ximian.com]On
Behalf Of Miguel de Icaza
Sent: Thursday, September 06, 2001 03:12
To: mono-list@ximian.com; mono-announce-list@ximian.com
Subject: [Mono-list] C# Compiler can compile hello world!

Hey guys!

   Today the Mono C# compiler compiled for the first time a HelloWorld

using System;

class sample {

	static void Main ()
		Console.WriteLine ("Hello World!");

   The program above is compiled into a native executable on Windows
that works (you can get this tonight on the next snapshot, or those
with CVS access can get the compiler right now).

   The compiler has support already for a bunch of statements and I am
actively working on the semantic analysis of expressions.  The above
is just the most sample and interesting program that I could get
compiling.  The framework for performing semantic analysis is pretty
much in place and just need to be filled in.

   I took a bunch of shortcuts to get the above example working, so
not all expressions work fully yet (for example Member Access
resolution it by no means complete), but we are on the case.

   Ravi has got the rest of high level elements on the language
generated now as well (the big missing part is everything related to
expressions which is the hearth of the work).

   Anyways, I am pretty excited, and wanted to share this with you
guys.  I also tried the following:

using System;

class sample {

	static void Main ()
		while (true)
			Console.WriteLine ("Hello World!");

    And it also does what you expect it to do ;-).

    Ok, I am going to have dinner and come back to fill in more
semantic bits.

Best wishes,

Mono-list maillist  -  Mono-list@ximian.com