December 16, 2005
In article <dnulsn$280g$1@digitaldaemon.com>, Charles says...
>
>Hey Shawn,
>
>Cool on the IDE!  I imagine if your put the code on SVN people will be willing to help, I could add intellisense if you like , I plan on translating parse.c from DMD to D (Unless someone has already done this ? ).

It comes to me, maybe what I'm going to say is very stupid, but I'm willing to take the risk :)

What about if the compiler had a mode (option or whatever) to compile and generate parsing information ideal for an editor/intelisense engine? I suppose this doesn't exist for D or it would have been used yet.

What could be the problems with this approach? The advantages are a lot. The editor wouldn't have to repeat work that the compiler had already done (parsing) and to update an editor on a language change would be also "trivial".

Any ideas or thougths??

>I've also decided to try to make a GUI builder for DWT -- just as a personal project -- but I could defintly use your input on it.  Ill start posting on DWT forum.
>
>Charlie
>
>
>"Shawn_Liu" <Shawn_Liu_member@pathlink.com> wrote in message news:dnt6vb$11cu$1@digitaldaemon.com...
>> In article <dnq9ui$20ss$1@digitaldaemon.com>, Charles says...
>> >
>> >Actually im no longer developing elephant , but Im going to try to start
>a
>> >new community IDE built with DWT , so if you have any thoughts on your
>ideal
>> >IDE please share them!
>>
>> I have written something from scratch with DWT, the Poseidon editor for D.
>It
>> can be shipped out in days. The main purpose of Poseidon is to test DWT
>but not
>> intend to be an IDE since the feature is thin and weak. By develope
>Poseidon, I
>> found and fixed some bugs in DWT.
>>
>> If you plan to write an IDE using DWT, I can provide help. DWT needs a comparative complex application to test and check. Thanks.
>>
>>
>>
>
>

Tom;
December 16, 2005
Charles wrote:
> Hey Shawn,
> 
> Cool on the IDE!  I imagine if your put the code on SVN people will be
> willing to help, I could add intellisense if you like , I plan on
> translating parse.c from DMD to D (Unless someone has already done this ? ).
> 
> I've also decided to try to make a GUI builder for DWT -- just as a personal
> project -- but I could defintly use your input on it.  Ill start posting on
> DWT forum.
> 
> Charlie
>

I remember Kris talking about the advantages of porting JFace to D also.  I believe it makes it easy to build GUI's with SWT.  Maybe that would be something to look into again?

-JJR
December 16, 2005
Tom wrote:
> In article <dnulsn$280g$1@digitaldaemon.com>, Charles says...
>> Hey Shawn,
>>
>> Cool on the IDE!  I imagine if your put the code on SVN people will be
>> willing to help, I could add intellisense if you like , I plan on
>> translating parse.c from DMD to D (Unless someone has already done this ? ).
> 
> It comes to me, maybe what I'm going to say is very stupid, but I'm willing to
> take the risk :)
> 
> What about if the compiler had a mode (option or whatever) to compile and
> generate parsing information ideal for an editor/intelisense engine? I suppose
> this doesn't exist for D or it would have been used yet.
> 
> What could be the problems with this approach? The advantages are a lot. The
> editor wouldn't have to repeat work that the compiler had already done (parsing)
> and to update an editor on a language change would be also "trivial".

I think this is one reason Walter has made the DMD front-end freely available.  It shouldn't be too terribly difficult to tie the lexer (and the parser, if you want to do more than code coloring) into an editor. The front-end is even already designed to operate on an in-memory buffer.


Sean
December 16, 2005
Unfortunately its not designed to be used other than in 'batch' mode , alot of the heap allocations rely on the program ending to be free'd , making it leak memory when calling Module::parse() more than once -- but it is a great source none the less.



"Sean Kelly" <sean@f4.ca> wrote in message news:dnv7hp$2l3v$2@digitaldaemon.com...
> Tom wrote:
> > In article <dnulsn$280g$1@digitaldaemon.com>, Charles says...
> >> Hey Shawn,
> >>
> >> Cool on the IDE!  I imagine if your put the code on SVN people will be willing to help, I could add intellisense if you like , I plan on translating parse.c from DMD to D (Unless someone has already done this
? ).
> >
> > It comes to me, maybe what I'm going to say is very stupid, but I'm
willing to
> > take the risk :)
> >
> > What about if the compiler had a mode (option or whatever) to compile
and
> > generate parsing information ideal for an editor/intelisense engine? I
suppose
> > this doesn't exist for D or it would have been used yet.
> >
> > What could be the problems with this approach? The advantages are a lot.
The
> > editor wouldn't have to repeat work that the compiler had already done
(parsing)
> > and to update an editor on a language change would be also "trivial".
>
> I think this is one reason Walter has made the DMD front-end freely available.  It shouldn't be too terribly difficult to tie the lexer (and the parser, if you want to do more than code coloring) into an editor. The front-end is even already designed to operate on an in-memory buffer.
>
>
> Sean


December 16, 2005
Charles wrote:
> Unfortunately its not designed to be used other than in 'batch' mode , alot
> of the heap allocations rely on the program ending to be free'd , making it
> leak memory when calling Module::parse() more than once -- but it is a great
> source none the less.

Yeah, I wondered about that.  I scanned the code one and turned up maybe two "delete" calls.  You could always use it with the Boehm GC.  I know the allocator calls already go through a class wrapper.


Sean
December 16, 2005
Tom wrote:
> In article <dnulsn$280g$1@digitaldaemon.com>, Charles says...
> 
>>Hey Shawn,
>>
>>Cool on the IDE!  I imagine if your put the code on SVN people will be
>>willing to help, I could add intellisense if you like , I plan on
>>translating parse.c from DMD to D (Unless someone has already done this ? ).
> 
> 
> It comes to me, maybe what I'm going to say is very stupid, but I'm willing to
> take the risk :)
> 
> What about if the compiler had a mode (option or whatever) to compile and
> generate parsing information ideal for an editor/intelisense engine? I suppose
> this doesn't exist for D or it would have been used yet.
> 
> What could be the problems with this approach? The advantages are a lot. The
> editor wouldn't have to repeat work that the compiler had already done (parsing)
> and to update an editor on a language change would be also "trivial".
> 
> Any ideas or thougths??

I've thought about that, but I was thinking more of writing another parser (not the one in dmd), because it seems to me that that dmd front-end is not designed to be used outside the compiler, it's not really extendable.

Alas I don't have any experience implementing compilers!
I did try it once (parsing) in java, and had some success parsing DeclDefs, I even added a hack to it to make generate header-like files, but it wasn't tested much, and I don't think anyone tried/tested/used it.

Now I'm thinking about doing it in D, but I'm a very lazy kinda guy!
Lexing is trivial, I did it before I knew what regular expressions were!!
Parsing .. not so easy! Although I have a rough idea of what I need to do, but it just seems complicated & lots of work.

The BlackBird eclipse editor plugin can parse .d files and figure out all the declarations, the it uses antlr (which is written in java), but I don't really what it is and/or how it works!! Maybe someone could port the whole thing to D?


> 
> 
>>I've also decided to try to make a GUI builder for DWT -- just as a personal
>>project -- but I could defintly use your input on it.  Ill start posting on
>>DWT forum.
>>
>>Charlie
>>
>>
>>"Shawn_Liu" <Shawn_Liu_member@pathlink.com> wrote in message
>>news:dnt6vb$11cu$1@digitaldaemon.com...
>>
>>>In article <dnq9ui$20ss$1@digitaldaemon.com>, Charles says...
>>>
>>>>Actually im no longer developing elephant , but Im going to try to start
>>
>>a
>>
>>>>new community IDE built with DWT , so if you have any thoughts on your
>>
>>ideal
>>
>>>>IDE please share them!
>>>
>>>I have written something from scratch with DWT, the Poseidon editor for D.
>>
>>It
>>
>>>can be shipped out in days. The main purpose of Poseidon is to test DWT
>>
>>but not
>>
>>>intend to be an IDE since the feature is thin and weak. By develope
>>
>>Poseidon, I
>>
>>>found and fixed some bugs in DWT.
>>>
>>>If you plan to write an IDE using DWT, I can provide help. DWT needs a
>>>comparative complex application to test and check. Thanks.
>>>
>>>
>>>
>>
>>
> 
> Tom;
December 17, 2005
In article <dnvkc8$2u0g$1@digitaldaemon.com>, Hasan Aljudy says...
>
>Tom wrote:
>> In article <dnulsn$280g$1@digitaldaemon.com>, Charles says...
>> 
>>>Hey Shawn,
>>>
>>>Cool on the IDE!  I imagine if your put the code on SVN people will be willing to help, I could add intellisense if you like , I plan on translating parse.c from DMD to D (Unless someone has already done this ? ).
>> 
>> 
>> It comes to me, maybe what I'm going to say is very stupid, but I'm willing to take the risk :)
>> 
>> What about if the compiler had a mode (option or whatever) to compile and generate parsing information ideal for an editor/intelisense engine? I suppose this doesn't exist for D or it would have been used yet.
>> 
>> What could be the problems with this approach? The advantages are a lot. The editor wouldn't have to repeat work that the compiler had already done (parsing) and to update an editor on a language change would be also "trivial".
>> 
>> Any ideas or thougths??
>
>I've thought about that, but I was thinking more of writing another parser (not the one in dmd), because it seems to me that that dmd front-end is not designed to be used outside the compiler, it's not really extendable.

That's not what I'm saying. I'm not asking someone to extend DMD parser, I'm thinking about what about if Walter could extend DMD to generate an output file with some easy format with the parsed info. This way a D editor have a lot less work to do and could stay more independent from language changes.

>Alas I don't have any experience implementing compilers!
>I did try it once (parsing) in java, and had some success parsing
>DeclDefs, I even added a hack to it to make generate header-like files,
>but it wasn't tested much, and I don't think anyone tried/tested/used it.
>
>Now I'm thinking about doing it in D, but I'm a very lazy kinda guy! Lexing is trivial, I did it before I knew what regular expressions were!! Parsing .. not so easy! Although I have a rough idea of what I need to do, but it just seems complicated & lots of work.
>
>The BlackBird eclipse editor plugin can parse .d files and figure out all the declarations, the it uses antlr (which is written in java), but I don't really what it is and/or how it works!! Maybe someone could port the whole thing to D?
>
>
>> 
>> 
>>>I've also decided to try to make a GUI builder for DWT -- just as a personal project -- but I could defintly use your input on it.  Ill start posting on DWT forum.
>>>
>>>Charlie
>>>
>>>
>>>"Shawn_Liu" <Shawn_Liu_member@pathlink.com> wrote in message news:dnt6vb$11cu$1@digitaldaemon.com...
>>>
>>>>In article <dnq9ui$20ss$1@digitaldaemon.com>, Charles says...
>>>>
>>>>>Actually im no longer developing elephant , but Im going to try to start
>>>
>>>a
>>>
>>>>>new community IDE built with DWT , so if you have any thoughts on your
>>>
>>>ideal
>>>
>>>>>IDE please share them!
>>>>
>>>>I have written something from scratch with DWT, the Poseidon editor for D.
>>>
>>>It
>>>
>>>>can be shipped out in days. The main purpose of Poseidon is to test DWT
>>>
>>>but not
>>>
>>>>intend to be an IDE since the feature is thin and weak. By develope
>>>
>>>Poseidon, I
>>>
>>>>found and fixed some bugs in DWT.
>>>>
>>>>If you plan to write an IDE using DWT, I can provide help. DWT needs a comparative complex application to test and check. Thanks.
>>>>
>>>>
>>>>
>>>
>>>
>> 
>> Tom;

Tom
December 18, 2005
Tom wrote:
> In article <dnulsn$280g$1@digitaldaemon.com>, Charles says...
> 
>>Hey Shawn,
>>
>>Cool on the IDE!  I imagine if your put the code on SVN people will be
>>willing to help, I could add intellisense if you like , I plan on
>>translating parse.c from DMD to D (Unless someone has already done this ? ).
> 
> 
> It comes to me, maybe what I'm going to say is very stupid, but I'm willing to
> take the risk :)
> 
> What about if the compiler had a mode (option or whatever) to compile and
> generate parsing information ideal for an editor/intelisense engine? I suppose
> this doesn't exist for D or it would have been used yet.

Would an XML format output from DDoc be enough?  Or is there some information that DDoc doesn't output that would be neccessary?

-- Chris Sauls
December 19, 2005
In article <do4kvt$1j2$1@digitaldaemon.com>, Chris Sauls says...
>
>Tom wrote:
>> In article <dnulsn$280g$1@digitaldaemon.com>, Charles says...
>> 
>>>Hey Shawn,
>>>
>>>Cool on the IDE!  I imagine if your put the code on SVN people will be willing to help, I could add intellisense if you like , I plan on translating parse.c from DMD to D (Unless someone has already done this ? ).
>> 
>> 
>> It comes to me, maybe what I'm going to say is very stupid, but I'm willing to take the risk :)
>> 
>> What about if the compiler had a mode (option or whatever) to compile and generate parsing information ideal for an editor/intelisense engine? I suppose this doesn't exist for D or it would have been used yet.
>
>Would an XML format output from DDoc be enough?  Or is there some information that DDoc doesn't output that would be neccessary?

Currently I see one mayor impossibility that makes Ddoc useless for the task: *when compiling with -D if the compiler fails to compile (because of an error), it doesn't generate the doc file*.

An XML format is a great idea (if the above weren't an impediment).

Tom
December 19, 2005
Yea  I spent the weekend trying to learn eclipse, and im totally sold ( on eclipse ).  There are several GUI builders already for SWT, including Eclipse's visual editor project ( http://www.eclipse.org/vep/ ) , which is actually a generic gui builder that can generate code for several toolkits, which already supports SWT, so DWT should be doable with not much work, pretty cool!

Can't wait to try the blackbird plugin ( for D ) , the PHP plugin pwns :D.

Charlie

"John Reimer" <terminal.node@gmail.com> wrote in message news:dnv5oh$2joo$1@digitaldaemon.com...
> Charles wrote:
> > Hey Shawn,
> >
> > Cool on the IDE!  I imagine if your put the code on SVN people will be willing to help, I could add intellisense if you like , I plan on translating parse.c from DMD to D (Unless someone has already done this
? ).
> >
> > I've also decided to try to make a GUI builder for DWT -- just as a
personal
> > project -- but I could defintly use your input on it.  Ill start posting
on
> > DWT forum.
> >
> > Charlie
> >
>
> I remember Kris talking about the advantages of porting JFace to D also.
>   I believe it makes it easy to build GUI's with SWT.  Maybe that would
> be something to look into again?
>
> -JJR