[mono-vb] Future of Mono's VB.NET

Rolf Bjarne rolfbasura at ya.com
Mon May 1 04:45:08 EDT 2006


By VB 8 I do mean VB 2005, and it does support all VB 2005 features
(including partial classes and generics) except the My namespace, unless I
missed something.

The parser is written by me, no parsing tools has been used. If this is
good or bad I do not know (I am no compiler guru at all so the code might
not be of a very good quality, but that I would leave to others to judge),
but in fact the MS compiler is also hand-written. I used the Visual Basic
Language Specification 8.0
in order to construct the parser, and I don't think it would be easy to
change it all to use a parsing tool now. The advantage is also that the
only executable needed for the moment to compile it all is vbc.exe! First
time I downloaded the mcs compiler some time ago I struggled quite some
time in order to just compile it (on Windows) because I couldn't get the
parsing tool (jay I think it was called) compiled.

The framework for the error reporting is there (it is easy to add a new
error message for a specific condition, it is just a line of code), but
error recovery is not that easy, during parsing no information is recorded
in order to return to a earlier known state. I don't think it would be
hard to implement, it would just take some time and effort.

I will try to upload the currrent code to sourceforge asap so you can have
a look at it.

On Mon, 01 May 2006 02:18:43 +0200, Alexandre Rocha Lima e Marcondes
<alexandremarcondes at psl-pr.softwarelivre.org> wrote:

> Hash: SHA1
> Hello Rolf,
>     Your project seems to be great ... The idea of a VB.NET compiler
> compiling itself is wonderful in my point of view. It would be the
> same as mcs (C# compiler compiling itself). I think we should discuss
> it a little more and take a look on the code, in order to think about
> adopting it as mono VB.NET compiler.
>     By VB 8 I think you mean VB.NET 2005, so let me ask: do you have
> support for partial classes and generics ?
>     What kind of parser do you have ? Would it be better to have a
> parser done by parsing tools instead ?
>     The error recovery and reporting, is there some prototype code, or
> it lacks all the support to these features ?
>      In my oppinion this would be a great SoC for this year. What do
> you think Miguel ?
> Rolf Bjarne wrote:
>> Hello,
>> I've been working on a vb compiler for some time now as a hobby and
>> it is
>> is currently able to compile simple files
>> correctly. The compiler needs some work in order to be usable, but
>> nothing
>> that can't be overcome.
>> My compiler has the following characteristics:
>> - It is written in vb, but it does currently not compile itself (I
>> don't
>> know if it runs on mono, I tried to use as
>> little as possible of the vb runtime in the compiler, but it is
>> completely
>> impossible not to use it).
>> - It supports all vb 8 features (except the My namespace for the
>> moment),
>> including generics.
>> - The parser is hand written, and is feature-complete (unless the My
>> feature requires changes in the parser, but I
>> don't think so).
>> Major todos:
>> - Practically no errors are reported, and no error recovery is
>> implemented
>> either.
>> - Implicit and explicit conversions.
>> - Debug (pdb) file generation.
>> I created a sourceforge project some time ago for the compiler
>> (http://sourceforge.net/projects/vbnc) and some old
>> code is available in cvs (http://cvs.sourceforge.net/viewcvs.py/vbnc/),
>> but this code is not at all close to the
>> state of the compiler now. If you are interested in having a look at
>> it I
>> can upload the current code to svn,
>> though it may take some time since I have to look through it for things
>> that are not supposed to be made public.
>> I can try to adopt the compiler so that it can be used by the Mono
>> project
>> (including implementing missing
>> functionality in the vb runtime), though I am not quite sure how
>> much work
>> would be needed. Anyway I'd love to do
>> this as a Google Summer of Code project, if possible!
>> Best regards
>> Rolf Bjarne Kvinge
>> On Thu, 20 Apr 2006 15:52:09 +0200, Miguel de Icaza <miguel at novell.com>
>> wrote:
>>> Hey,
>>>     Yesterday I met with Rafael and we discussed a bit what we
>>> wanted to
>>> do with Mono's VB compiler.
>>>     The situation is that today's VB compiler is based on a fork of
>>> mcs
>>> circa 2002.  And although some of the improvements to mcs made it into
>>> mbas, they were not all incorporated.
>>>     To make things worse, the new VB.NET supports generics.   So we
>>> are
>>> wondering whether it would not be a better idea to start a fresh fork
>>> from gmcs (along the same proposal that Jambunathan had a year or so
>>> ago) and implement VB that way.  Lets call this effort "mbas2".
>>>     The idea would be to go in chunks: we could integrate individual
>>> commits that were done to the old mbas tree, and determine one by one
>>> whether it applies to mbas2.
>>>     Maybe not all of the code can be salvaged, but if we can get even
>>> 40% of the old code migrated into the new tree it would be a big plus.
>>>     Now, this might be insane, because once I was talking to
>>> someone on
>>> the VB.NET team and when I told them how mbas was written he said
>>> "I did
>>> not think that VB.NET could be implemented that way".   Maybe our
>>> approach is completely busted, but I do not know enough about
>>> VB.NET to
>>> know.  I just know that if the original mbas idea made sense, we
>>> should
>>> probably start from scratch.
>>>     Now, since we are already too close to 1.2, we should probably
>>> develop this on a separate tree, to avoid breaking the build of
>>> "mono/mcs", so it should be another top level module in the Mono
>>> repository.  And we should probably also kill "mcs/bmcs" (at least we
>>> could retrieve the few patches that were done there).
>>> Miguel.
>>> _______________________________________________
>>> Mono-vb mailing list
>>> Mono-vb at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-vb
>> --Using M2, Opera's revolutionary e-mail client:
>> http://www.opera.com/m2/
>> --No virus found in this outgoing message.
>> Checked by AVG Free Edition.
>> Version: 7.1.385 / Virus Database: 268.5.1/327 - Release Date:
>> 28/04/2006
>> _______________________________________________
>> Mono-vb mailing list
>> Mono-vb at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-vb
> Version: GnuPG v1.4.3rc2 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
> WWXYA4nyWA9d9BsHqU23JLFnLc4PmTqQUZwQeQT6LkAtOT/8sN858iNzFT4+9Bel
> 1HMiFM2cgTKwpNvhdUje9IK9aSOWH5JLev+Fw7eSWShb+rwEvQrk70bWONNug1ZU
> 2YnzxWM9PHc=
> =Q4BK

Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.5.1/327 - Release Date: 28/04/2006

More information about the Mono-vb mailing list