[Mono-devel-list] Extending mcs

Rodrigo B. de Oliveira rbo at acm.org
Wed Nov 17 14:12:55 EST 2004


The boo compiler is based on a pipeline architecture in which parsing just 
happens to be the first step of most standard pipelines.

You can provide a different parser and still take advantage of all the 
extensibility goodies: syntactic attributes and macros. In other words, the 
source code would still be c# compatible. The generated code wouldn't even 
depend on Boo.dll in most cases.

For instance:

class Customer
{
     [getter(FirstName)] string _fname;

     public Customer([required] string fname)
     {
           _fname = fname;
     }
}

is valid c# but would be expanded by the boo compiler to:

class Customer
{
     string _fname;

     public Customer(string fname)
     {
           if (null == fname)
           {
                 throw new ArgumentNullException("fname");
           }
           _fname = fname;
      }

      public string FirstName
      {
            get
            {
                 return _fname;
            }
      }
}

I haven't checked XC# lately but last time I did I think they provided 
something like that, right?

cheers!
Rodrigo

----- Original Message ----- 
From: "Matthijs ter Woord (meddochat)" <meddochat at zonnet.nl>
To: <mono-devel-list at lists.ximian.com>
Sent: Thursday, November 18, 2004 3:48 PM
Subject: Re: [Mono-devel-list] Extending mcs


> Hi Rodrigo, Michal and Jonathan.
>
> Thanks for the reply.
>
> I'm personally more interested in keeping the source c# compatible. that's
> perfectly possible using XC# (Extensible C#). I don't know how it would be
> done in Nemerle or Boo, but that would be 100 % great.
>
> bye meddochat
>
>
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 




More information about the Mono-devel-list mailing list