[Mono-list] Status of Bison port to C#

Ravi Pratap M ravi@ximian.com
23 Feb 2002 12:53:35 -0600

Hi Stephen,

On Fri, 2002-02-22 at 23:09, Stephen Torri wrote:
> I first need to get my hands on the language specification for C#. I
> will need to read that first before I begin.

	Yes of course and since you know Java, you will have that sense of deja
vu :-)

> > The goal definitely needs to be "add C# support, but keep Java support
> > as well".  In the end I imagine some sort of command line switch to
> > select which language you want it to generate with, just like lex does
> > with C/C++.
> If we are making this to be the C# compiler for mono I don't think its
> in our best interest to play with Java. Java has an already good
> compiler from IBM called Jikes. Jikes is fast. No sense in re-inventing
> the wheel.

	Umm, this is definitely not the C# _compiler_ for Mono - what we are
trying to do is write the parser-generator so that it generates C# code
which does the parsing. Currently, Miguel's port of Jay to generate C#
code works pretty well and what we are trying to do is only replace Jay
- nothing else !

	Nick wants you to keep in mind that jb2csharp should be able to
generate Java code for the parser if necessary and this should be
through a command-line switch. Nobody here is trying to replace Jikes

> present compiler. I would like to write this parser in C# so that it can
> bootstrap with the rest of the compiler. This is my thoughts so far.

	Write the parser is C# ? Oh no, there's no need for that at all :-) I
imagine jb2csharp is written in C and you probably want to stick to
that. You only want to emit the parser by generating C# code. That's all
we need.

	So I suppose you could do the following :

	* Poke around in jb2csharp [read sources etc]

	* See how Jay is currently used inside mcs [cs-parser.jay etc] 

	* Hack on jb2csharp so that we can effectively replace jay with
jb2csharp :-)

	Thanks very much for your enthusiasm on this - this is certainly on one
of the long-term TODO lists of the compiler :-)



"If you're smart, you'll be humble. There always is somebody
who hasn't read a book and knows twice as much as you do."

              -- David Duchovny in Readers' Digest

	Ravi Pratap M                    <ravi@ximian.com>