www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - D symbol demangler

reply James Dunne <jdunne4 bradley.edu> writes:
I dont know why I'm posting this now, since I have no way of getting the module
on to the internet right now, but anyway..

I've written a nice set of D classes today that extract the type information
from a mangled D symbol, like "_D3std4testFAaZv".  You've all seen them before
I'm sure.  Anyway, this module will transform that string into "void
std.test(char[])" (with optional support for ANSI syntax highlighting on the
Linux console    Ooooohh Aaaaah).

A nice way of storing the types in classes is employed.  A DType class is the
base class of any D type.  A DReservedType class exists to hold a basic type
(int, uint, void, etc.), but I should really use DTypeInt, DTypeUInt, DTypeVoid,
etc. instead (separate class per each basic type).  Every class overrides the
toString() function to return the D type as a string, which is very nice.

This should prove to be useful in writing my IDE once I get the code-parsing
module done.  Then I can have both compiled-library AND source-code-parsed
code-completion info to play with!

P.S. - I'll release the module once I get my network switch back from a friend.
I left it there at a LAN party... dammit.  Then I can connect the internet
modem-equipped PC with my development PC and upload the module!  Yargh.

Regards,
James Dunne
Jan 05 2005
parent reply James Dunne <jdunne4 bradley.edu> writes:
I threw it on a digital camera!  How nice... Enjoy it!

In article <crievv$qhv$1 digitaldaemon.com>, James Dunne says...
I dont know why I'm posting this now, since I have no way of getting the module
on to the internet right now, but anyway..

I've written a nice set of D classes today that extract the type information
from a mangled D symbol, like "_D3std4testFAaZv".  You've all seen them before
I'm sure.  Anyway, this module will transform that string into "void
std.test(char[])" (with optional support for ANSI syntax highlighting on the
Linux console    Ooooohh Aaaaah).

A nice way of storing the types in classes is employed.  A DType class is the
base class of any D type.  A DReservedType class exists to hold a basic type
(int, uint, void, etc.), but I should really use DTypeInt, DTypeUInt, DTypeVoid,
etc. instead (separate class per each basic type).  Every class overrides the
toString() function to return the D type as a string, which is very nice.

This should prove to be useful in writing my IDE once I get the code-parsing
module done.  Then I can have both compiled-library AND source-code-parsed
code-completion info to play with!

P.S. - I'll release the module once I get my network switch back from a friend.
I left it there at a LAN party... dammit.  Then I can connect the internet
modem-equipped PC with my development PC and upload the module!  Yargh.

Regards,
James Dunne

Jan 05 2005
next sibling parent reply John Reimer <brk_6502 yahoo.com> writes:
James Dunne wrote:
 I threw it on a digital camera!  How nice... Enjoy it!
 

Lol! Now that's a McGyver move, if I ever saw one!
Jan 05 2005
parent James Dunne <jdunne4 bradley.edu> writes:
In article <crik5r$10m2$1 digitaldaemon.com>, John Reimer says...
James Dunne wrote:
 I threw it on a digital camera!  How nice... Enjoy it!
 

Lol! Now that's a McGyver move, if I ever saw one!

lol. Yeah, i'm resourceful!
Jan 06 2005
prev sibling parent reply "Carlos Santander B." <csantander619 gmail.com> writes:
James Dunne wrote:
 I threw it on a digital camera!  How nice... Enjoy it!
 
 In article <crievv$qhv$1 digitaldaemon.com>, James Dunne says...
 
I dont know why I'm posting this now, since I have no way of getting the module
on to the internet right now, but anyway..

I've written a nice set of D classes today that extract the type information

from a mangled D symbol, like "_D3std4testFAaZv".  You've all seen them before

I'm sure.  Anyway, this module will transform that string into "void
std.test(char[])" (with optional support for ANSI syntax highlighting on the
Linux console    Ooooohh Aaaaah).

A nice way of storing the types in classes is employed.  A DType class is the
base class of any D type.  A DReservedType class exists to hold a basic type
(int, uint, void, etc.), but I should really use DTypeInt, DTypeUInt, DTypeVoid,
etc. instead (separate class per each basic type).  Every class overrides the
toString() function to return the D type as a string, which is very nice.

This should prove to be useful in writing my IDE once I get the code-parsing
module done.  Then I can have both compiled-library AND source-code-parsed
code-completion info to play with!

P.S. - I'll release the module once I get my network switch back from a friend.
I left it there at a LAN party... dammit.  Then I can connect the internet
modem-equipped PC with my development PC and upload the module!  Yargh.

Regards,
James Dunne


A couple of weeks ago I went from Outlook Express to Thunderbird. Both files attached yesterday (this one and phobos-nogc.zip) couldn't be downloaded by TB. I mean, the message is downloaded, and the attachements are there, but it just doesn't open them. I had to save the messages as .eml and then open them with OE to get the dsymextract.d (phobos-nogc.zip was a no-go since it's a 2 part message). Anyway, did anyone else experience that? Does it have a solution? _______________________ Carlos Santander Bernal
Jan 07 2005
parent reply John Reimer <brk_6502 yahoo.com> writes:
Carlos Santander B. wrote:

 A couple of weeks ago I went from Outlook Express to Thunderbird. Both 
 files attached yesterday (this one and phobos-nogc.zip) couldn't be 
 downloaded by TB. I mean, the message is downloaded, and the 
 attachements are there, but it just doesn't open them. I had to save the 
 messages as .eml and then open them with OE to get the dsymextract.d 
 (phobos-nogc.zip was a no-go since it's a 2 part message).
 Anyway, did anyone else experience that? Does it have a solution?
 
 _______________________
 Carlos Santander Bernal

Hello Carlos, I'm using Thunderbird v1.0 on WinXP for email and newsgroup management. It worked for me. The attachment appears as a file listed in a separate widget just below the message window. It says "Attachments:" to the left of it followed by the file name. I'm not sure why it's not working for you. Perhaps there's a feature in the settings that enables/disables attachments? Later, John
Jan 07 2005
parent reply "Carlos Santander B." <csantander619 gmail.com> writes:
John Reimer wrote:
 Carlos Santander B. wrote:
 
 A couple of weeks ago I went from Outlook Express to Thunderbird. Both 
 files attached yesterday (this one and phobos-nogc.zip) couldn't be 
 downloaded by TB. I mean, the message is downloaded, and the 
 attachements are there, but it just doesn't open them. I had to save 
 the messages as .eml and then open them with OE to get the 
 dsymextract.d (phobos-nogc.zip was a no-go since it's a 2 part message).
 Anyway, did anyone else experience that? Does it have a solution?

 _______________________
 Carlos Santander Bernal

Hello Carlos, I'm using Thunderbird v1.0 on WinXP for email and newsgroup management. It worked for me. The attachment appears as a file listed in a separate widget just below the message window. It says "Attachments:" to the left of it followed by the file name. I'm not sure why it's not working for you. Perhaps there's a feature in the settings that enables/disables attachments? Later, John

Hi John, No, the attachments show up, but I can't open them (nothing happens) or save them ("unable to save"). And if I try to see the message source, the source window shows up empty. Then I save the message, and OE can open it and the attachment, but TB just shows the message and no attachment. And I don't think there's something wrong with my configuration, because email attachments work fine. Kinda weird, me thinks. _______________________ Carlos Santander Bernal
Jan 07 2005
parent reply John Reimer <brk_6502 yahoo.com> writes:
Carlos Santander B. wrote:
 John Reimer wrote:
 
 Carlos Santander B. wrote:

 A couple of weeks ago I went from Outlook Express to Thunderbird. 
 Both files attached yesterday (this one and phobos-nogc.zip) couldn't 
 be downloaded by TB. I mean, the message is downloaded, and the 
 attachements are there, but it just doesn't open them. I had to save 
 the messages as .eml and then open them with OE to get the 
 dsymextract.d (phobos-nogc.zip was a no-go since it's a 2 part message).
 Anyway, did anyone else experience that? Does it have a solution?

 _______________________
 Carlos Santander Bernal

Hello Carlos, I'm using Thunderbird v1.0 on WinXP for email and newsgroup management. It worked for me. The attachment appears as a file listed in a separate widget just below the message window. It says "Attachments:" to the left of it followed by the file name. I'm not sure why it's not working for you. Perhaps there's a feature in the settings that enables/disables attachments? Later, John

Hi John, No, the attachments show up, but I can't open them (nothing happens) or save them ("unable to save"). And if I try to see the message source, the source window shows up empty. Then I save the message, and OE can open it and the attachment, but TB just shows the message and no attachment. And I don't think there's something wrong with my configuration, because email attachments work fine. Kinda weird, me thinks. _______________________ Carlos Santander Bernal

That is kinda weird. I'm able to simply right click on the file attachment, choose "save as" and voila... it works. Strange that your's doesn't want to save :-(. I hope you figure it out.
Jan 07 2005
parent reply "Carlos Santander B." <csantander619 gmail.com> writes:
John Reimer wrote:
 
 That is kinda weird.  I'm able to simply right click on the file 
 attachment, choose "save as" and voila... it works.  Strange that your's 
 doesn't want to save :-(.  I hope you figure it out.
 

Thanks. _______________________ Carlos Santander Bernal
Jan 07 2005
parent reply Lars Ivar Igesund <larsivar igesund.net> writes:
Carlos Santander B. wrote:
 John Reimer wrote:
 
 That is kinda weird.  I'm able to simply right click on the file 
 attachment, choose "save as" and voila... it works.  Strange that 
 your's doesn't want to save :-(.  I hope you figure it out.

Thanks. _______________________ Carlos Santander Bernal

Really strange. Mine works too. Lars Ivar Igesund
Jan 08 2005
parent reply James Dunne <jdunne4 bradley.edu> writes:
In lieu of your problems, I've posted the zip in the bindings project at
dsource.org.  Here's a link:

http://svn.dsource.org/svn/projects/bindings/trunk/

There are all my other goodies there too: id3tag, dparse, dlexer, dsymextract.

In article <croruo$1ugf$1 digitaldaemon.com>, Lars Ivar Igesund says...
Carlos Santander B. wrote:
 John Reimer wrote:
 
 That is kinda weird.  I'm able to simply right click on the file 
 attachment, choose "save as" and voila... it works.  Strange that 
 your's doesn't want to save :-(.  I hope you figure it out.

Thanks. _______________________ Carlos Santander Bernal

Really strange. Mine works too. Lars Ivar Igesund

Jan 12 2005
parent "Carlos Santander B." <csantander619 gmail.com> writes:
James Dunne wrote:
 In lieu of your problems, I've posted the zip in the bindings project at
 dsource.org.  Here's a link:
 
 http://svn.dsource.org/svn/projects/bindings/trunk/
 
 There are all my other goodies there too: id3tag, dparse, dlexer, dsymextract.
 

Thanks. _______________________ Carlos Santander Bernal
Jan 12 2005