Jump to page: 1 2
Thread overview
DMD front end starter kit
Apr 01, 2005
Ben Hinkle
Apr 01, 2005
Charlie
Apr 01, 2005
Ben Hinkle
Apr 01, 2005
Charlie
Apr 01, 2005
Ben Hinkle
Apr 01, 2005
Charlie
Apr 01, 2005
Ben Hinkle
Apr 01, 2005
Charlie
Apr 01, 2005
Ben Hinkle
Apr 02, 2005
Ben Hinkle
Apr 03, 2005
Charlie
Apr 03, 2005
Charlie
Apr 04, 2005
Ben Hinkle
Apr 01, 2005
Lynn Allan
Apr 01, 2005
Ben Hinkle
Apr 02, 2005
Walter
Apr 04, 2005
Lynn Allan
Apr 04, 2005
Ben Hinkle
April 01, 2005
I started a few project that needed the dmd front end code so I got the
source for the DMD front-end into a standalone form and have put it on my
website as a "starter kit" for others to build D parsers and analyzers. Get
it at
http://home.comcast.net/~benhinkle/dmdfe
There is a pre-built program that just prints debugging parsing and semantic
information but that program by itself is not very useful. Hopefully it will
be easy for people to customize for different tools but if there's something
I can do to improve the starter kit let me know.

Currently only Windows is supported (but that's probably just becuase I haven't made a Makefile for Linux yet). The project is GPL.

Happy Tooling!

-Ben


April 01, 2005
Coolness :) , do you have a script or some automation for this ?

Charlie


"Ben Hinkle" <ben.hinkle@gmail.com> wrote in message news:d2jie3$nl1$1@digitaldaemon.com...
> I started a few project that needed the dmd front end code so I got the source for the DMD front-end into a standalone form and have put it on my website as a "starter kit" for others to build D parsers and analyzers.
Get
> it at
> http://home.comcast.net/~benhinkle/dmdfe
> There is a pre-built program that just prints debugging parsing and
semantic
> information but that program by itself is not very useful. Hopefully it
will
> be easy for people to customize for different tools but if there's
something
> I can do to improve the starter kit let me know.
>
> Currently only Windows is supported (but that's probably just becuase I haven't made a Makefile for Linux yet). The project is GPL.
>
> Happy Tooling!
>
> -Ben
>
>


April 01, 2005
"Charlie" <charles@jwavro.com> wrote in message news:d2jsas$12eo$1@digitaldaemon.com...
> Coolness :) , do you have a script or some automation for this ?

no but it's a good idea. I emailed Walter some changes to get the #includes working so that I didn't have to worry about including total.h or something. Other than that I uncommented some printf's to get some debugging output and the rest is right out of the dmd.zip. Hopefully with new versions of dmd it shouldn't be much work to plop it in.


April 01, 2005
> Hopefully with new versions of dmd it
> shouldn't be much work to plop it in.

Yea it will help alot I think.  Thanks for doing this!

Charlie



"Ben Hinkle" <bhinkle@mathworks.com> wrote in message news:d2jue1$146c$1@digitaldaemon.com...
>
> "Charlie" <charles@jwavro.com> wrote in message news:d2jsas$12eo$1@digitaldaemon.com...
> > Coolness :) , do you have a script or some automation for this ?
>
> no but it's a good idea. I emailed Walter some changes to get the
#includes
> working so that I didn't have to worry about including total.h or
something.
> Other than that I uncommented some printf's to get some debugging output
and
> the rest is right out of the dmd.zip. Hopefully with new versions of dmd
it
> shouldn't be much work to plop it in.
>
>


April 01, 2005
> Currently only Windows is supported (but that's probably just
becuase I
> haven't made a Makefile for Linux yet). The project is GPL.

Just curious why you are using gpl ... was that necessary based on derivation, or your preference? If preference, why?



April 01, 2005
"Lynn Allan" <l_d_allan@adelphia.net> wrote in message news:d2k3fj$19b0$1@digitaldaemon.com...
>> Currently only Windows is supported (but that's probably just
> becuase I
>> haven't made a Makefile for Linux yet). The project is GPL.
>
> Just curious why you are using gpl ... was that necessary based on derivation, or your preference? If preference, why?

The dmd source allows either GPL or the artistic license and I just chose GPL because I understand it. I haven't looked closely at the artistic one - would you prefer that license? I'm not really sure how it differs from GPL, to be honest. Maybe I should keep the same style as dmd and say "either GPL or Artistic". That would probably be the best approach.


April 01, 2005
"Charlie" <charles@jwavro.com> wrote in message news:d2k1bk$1798$1@digitaldaemon.com...
>> Hopefully with new versions of dmd it
>> shouldn't be much work to plop it in.
>
> Yea it will help alot I think.  Thanks for doing this!

no problem. I'm working on getting a basic dlint going and hooking it up to
the emacs mode for error and warning highlighting. That and I want to write
a reflection API generator.
It's also fun to see just how much of phobos gets sucked in when you import
std.string :-)


April 01, 2005
> I'm working on getting a basic dlint going and hooking it up to the emacs mode for error and warning highlighting

Coolness.

> That and I want to write
> a reflection API generator.

Now this sounds fun :).  Have you started getting some ideas down on it ? I'd like to hear 'em ( are you going to add meta-data to the executable ? If so where you going to put it so D doesnt require a new exe format ? )

C



"Ben Hinkle" <bhinkle@mathworks.com> wrote in message news:d2k6r0$1cpr$1@digitaldaemon.com...
>
> "Charlie" <charles@jwavro.com> wrote in message news:d2k1bk$1798$1@digitaldaemon.com...
> >> Hopefully with new versions of dmd it
> >> shouldn't be much work to plop it in.
> >
> > Yea it will help alot I think.  Thanks for doing this!
>
> no problem. I'm working on getting a basic dlint going and hooking it up
to
> the emacs mode for error and warning highlighting. That and I want to
write
> a reflection API generator.
> It's also fun to see just how much of phobos gets sucked in when you
import
> std.string :-)
>
>


April 01, 2005
"Charlie" <charles@jwavro.com> wrote in message news:d2kbrj$1hu4$1@digitaldaemon.com...
>> I'm working on getting a basic dlint going and hooking it up to the emacs mode for error and warning highlighting
>
> Coolness.
>
>> That and I want to write
>> a reflection API generator.
>
> Now this sounds fun :).  Have you started getting some ideas down on it ? I'd like to hear 'em ( are you going to add meta-data to the executable ? If so where you going to put it so D doesnt require a new exe format ? )

I was going to read in class source and write out D code for class(es) that implement a reflection API that resembles Java's reflection API. In other words if the input source code looks like

  class Foo {
    int x;
    void bar() {}
  }

then the output class looks something like

  class FooClass : Class {
    this() {
      fields ~= new Field("x",typeid(int),Access.Public);
      methods ~= new Method("bar",<signature>, Access.Public);
    }
    Object newInstance(){ return new Foo(); }
    ...
  }
  static this() { registerClass("Foo",...); }

You have to compile the reflection class and link it in with any class that you want reflected. I haven't thought about how exactly the registration happens or all the signature stuff will work etc etc but I figure something along these lines should work out. The front end should have all the info about members and constructors that one would need.


April 01, 2005
> I was going to read in class source and write out D code for class(es)
that
> implement a reflection API that resembles Java's reflection API. In other words if the input source code looks like

Ahh cool didnt know Java did it like this.

Attached is a simple php script to convert the front-end to be compilable by MSVC.  It doesnt catch everything ( sys/time.h ) but it should catch most things.

Charlie

"Ben Hinkle" <bhinkle@mathworks.com> wrote in message news:d2kd45$1j2b$1@digitaldaemon.com...
>
> "Charlie" <charles@jwavro.com> wrote in message news:d2kbrj$1hu4$1@digitaldaemon.com...
> >> I'm working on getting a basic dlint going and hooking it up to the emacs mode for error and warning highlighting
> >
> > Coolness.
> >
> >> That and I want to write
> >> a reflection API generator.
> >
> > Now this sounds fun :).  Have you started getting some ideas down on it
?
> > I'd like to hear 'em ( are you going to add meta-data to the executable
?
> > If so where you going to put it so D doesnt require a new exe format ? )
>
> I was going to read in class source and write out D code for class(es)
that
> implement a reflection API that resembles Java's reflection API. In other words if the input source code looks like
>
>   class Foo {
>     int x;
>     void bar() {}
>   }
>
> then the output class looks something like
>
>   class FooClass : Class {
>     this() {
>       fields ~= new Field("x",typeid(int),Access.Public);
>       methods ~= new Method("bar",<signature>, Access.Public);
>     }
>     Object newInstance(){ return new Foo(); }
>     ...
>   }
>   static this() { registerClass("Foo",...); }
>
> You have to compile the reflection class and link it in with any class
that
> you want reflected. I haven't thought about how exactly the registration happens or all the signature stuff will work etc etc but I figure
something
> along these lines should work out. The front end should have all the info about members and constructors that one would need.
>
>



« First   ‹ Prev
1 2