BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Retrieve Delphi class properties/methods information from so

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (General)
View previous topic :: View next topic  
Author Message
Paul Nicholls
Guest





PostPosted: Wed Sep 27, 2006 8:07 am    Post subject: Retrieve Delphi class properties/methods information from so Reply with quote



Hi all,
I want to generate output code to create wrapping code for some Delphi
classes so I can use the classes within Lua scripts (www.lua.org).

To do this I first need a way of grabbing the classes from source code and
retrieving the public/published properties and methods.

I will then parse this information and generate source code that is
compatible with Lua.

Instead of creating my own recursive descent parser, is there anything out
there that may already parse Delphi source code into maybe a tree or other
structure that I can then grab the information from?

cheers,
Cheers,
Paul.

"The plastic veneer of civilization is easily melted in the heat of the
moment" - Paul Nicholls.
paul_nicholls (AT) hotmail (DOT) NOSPAM.com

Remove ".NOSPAM" to reply.
Back to top
Charles McAllister
Guest





PostPosted: Wed Sep 27, 2006 11:19 pm    Post subject: Re: Retrieve Delphi class properties/methods information fro Reply with quote



Paul Nicholls wrote:
Quote:
Hi all,
I want to generate output code to create wrapping code for some Delphi
classes so I can use the classes within Lua scripts (www.lua.org).

To do this I first need a way of grabbing the classes from source code and
retrieving the public/published properties and methods.

I will then parse this information and generate source code that is
compatible with Lua.

Instead of creating my own recursive descent parser, is there anything out
there that may already parse Delphi source code into maybe a tree or other
structure that I can then grab the information from?


You can use ModelMaker to parse your source code. It has a nice API for examining all of the modules in your project, and all of the classes in each module, as well as the members (fields, methods, properties) of each class.

If you're wanting something free, there's CodeWrench
http://cc.borland.com/Item.aspx?id=23831

....its usable but it is beta quality.
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Wed Sep 27, 2006 11:51 pm    Post subject: Re: Retrieve Delphi class properties/methods information fro Reply with quote



"Paul Nicholls" <paul_nicholls (AT) hotmail (DOT) NOSPAM.com> wrote in message
news:4519eada$1 (AT) newsgroups (DOT) borland.com...

Quote:
To do this I first need a way of grabbing the classes from source
code and retrieving the public/published properties and methods.

If you have BDS 2006, you can enable the "Generate XML documentation" option
in the IDE settings, then compile the code normally. You can then process
the resulting XML file, which will contain everything you are asking for.

Otherwise, you will have to parse the original Pascal code directly.


Gambit
Back to top
Paul Nicholls
Guest





PostPosted: Thu Sep 28, 2006 4:22 am    Post subject: Re: Retrieve Delphi class properties/methods information fro Reply with quote

"Remy Lebeau (TeamB)" <no.spam (AT) no (DOT) spam.com> wrote in message
news:451ac8cb$1 (AT) newsgroups (DOT) borland.com...
Quote:

"Paul Nicholls" <paul_nicholls (AT) hotmail (DOT) NOSPAM.com> wrote in message
news:4519eada$1 (AT) newsgroups (DOT) borland.com...

To do this I first need a way of grabbing the classes from source
code and retrieving the public/published properties and methods.

If you have BDS 2006, you can enable the "Generate XML documentation"
option
in the IDE settings, then compile the code normally. You can then process
the resulting XML file, which will contain everything you are asking for.

Otherwise, you will have to parse the original Pascal code directly.


Gambit


Can Delphi 6 do this as well? I have Delphi 6 and Delphi 5.

Cheers,
Paul.
Back to top
Paul Nicholls
Guest





PostPosted: Thu Sep 28, 2006 4:24 am    Post subject: Re: Retrieve Delphi class properties/methods information fro Reply with quote

"Charles McAllister" <charles (AT) avimark (DOT) net> wrote in message
news:451ac0b8 (AT) newsgroups (DOT) borland.com...
Quote:
Paul Nicholls wrote:
Hi all,
I want to generate output code to create wrapping code for some
Delphi classes so I can use the classes within Lua scripts (www.lua.org).

To do this I first need a way of grabbing the classes from source code
and retrieving the public/published properties and methods.

I will then parse this information and generate source code that is
compatible with Lua.

Instead of creating my own recursive descent parser, is there anything
out there that may already parse Delphi source code into maybe a tree or
other structure that I can then grab the information from?


You can use ModelMaker to parse your source code. It has a nice API for
examining all of the modules in your project, and all of the classes in
each module, as well as the members (fields, methods, properties) of each
class.

If you're wanting something free, there's CodeWrench
http://cc.borland.com/Item.aspx?id=23831

...its usable but it is beta quality.

Thanks, I will check out CodeWrench :-)

cheers,
Paul.
Back to top
Paul Nicholls
Guest





PostPosted: Thu Sep 28, 2006 4:37 am    Post subject: Re: Retrieve Delphi class properties/methods information fro Reply with quote

"Charles McAllister" <charles (AT) avimark (DOT) net> wrote in message
news:451ac0b8 (AT) newsgroups (DOT) borland.com...
Quote:
Paul Nicholls wrote:
Hi all,
I want to generate output code to create wrapping code for some
Delphi classes so I can use the classes within Lua scripts (www.lua.org).

To do this I first need a way of grabbing the classes from source code
and retrieving the public/published properties and methods.

I will then parse this information and generate source code that is
compatible with Lua.

Instead of creating my own recursive descent parser, is there anything
out there that may already parse Delphi source code into maybe a tree or
other structure that I can then grab the information from?


You can use ModelMaker to parse your source code. It has a nice API for
examining all of the modules in your project, and all of the classes in
each module, as well as the members (fields, methods, properties) of each
class.

If you're wanting something free, there's CodeWrench
http://cc.borland.com/Item.aspx?id=23831

...its usable but it is beta quality.

I tried running the CodeWrench.exe in the bin folder and I got an error:

"This application has failed tostart because rtl70.bpl was not found.
Re-installing the application may fix this problem."

Paul.
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Thu Sep 28, 2006 8:12 am    Post subject: Re: Retrieve Delphi class properties/methods information fro Reply with quote

"Paul Nicholls" <paul_nicholls (AT) hotmail (DOT) NOSPAM.com> wrote in message
news:451b07b7 (AT) newsgroups (DOT) borland.com...

Quote:
Can Delphi 6 do this as well?

No. It is a new feature in BDS 2006.


Gambit
Back to top
Gerrit Jan
Guest





PostPosted: Thu Sep 28, 2006 8:12 am    Post subject: Re: Retrieve Delphi class properties/methods information fro Reply with quote

"Paul Nicholls" <paul_nicholls (AT) hotmail (DOT) NOSPAM.com> wrote:
<snip>
Quote:
Instead of creating my own recursive descent parser, is there anything out
there that may already parse Delphi source code into maybe a tree or other
structure that I can then grab the information from?
snip


Hi,

You might have a look at DelphiCodeToDoc at http://sourceforge.net/projects/dephicodetodoc/

Kind regards,

Gerrit Jan
Back to top
rbwinston
Guest





PostPosted: Thu Sep 28, 2006 4:00 pm    Post subject: Re: Retrieve Delphi class properties/methods information fro Reply with quote

You could take a look at PasDoc and try modifying it to do what you
want.

http://pasdoc.sipsolutions.net/

"Paul Nicholls" <paul_nicholls (AT) hotmail (DOT) NOSPAM.com> wrote:

Quote:
Hi all,
I want to generate output code to create wrapping code for some Delphi
classes so I can use the classes within Lua scripts (www.lua.org).

To do this I first need a way of grabbing the classes from source code and
retrieving the public/published properties and methods.

I will then parse this information and generate source code that is
compatible with Lua.

Instead of creating my own recursive descent parser, is there anything out
there that may already parse Delphi source code into maybe a tree or other
structure that I can then grab the information from?

cheers,
Cheers,
Paul.

"The plastic veneer of civilization is easily melted in the heat of the
moment" - Paul Nicholls.
paul_nicholls (AT) hotmail (DOT) NOSPAM.com

Remove ".NOSPAM" to reply.
Back to top
Charles McAllister
Guest





PostPosted: Thu Sep 28, 2006 6:09 pm    Post subject: Re: Retrieve Delphi class properties/methods information fro Reply with quote

Paul Nicholls wrote:
Quote:

I tried running the CodeWrench.exe in the bin folder and I got an error:

"This application has failed tostart because rtl70.bpl was not found.
Re-installing the application may fix this problem."

Paul.



you'll need the runtime for D7, or you'll have to recompile the project and packages for your version of Delphi.
Back to top
Paul Nicholls
Guest





PostPosted: Fri Sep 29, 2006 3:24 am    Post subject: Re: Retrieve Delphi class properties/methods information fro Reply with quote

"Charles McAllister" <charles (AT) avimark (DOT) net> wrote in message
news:451bc97f$1 (AT) newsgroups (DOT) borland.com...
Quote:
Paul Nicholls wrote:

I tried running the CodeWrench.exe in the bin folder and I got an error:

"This application has failed tostart because rtl70.bpl was not found.
Re-installing the application may fix this problem."

Paul.

you'll need the runtime for D7, or you'll have to recompile the project
and packages for your version of Delphi.

cheers,
Paul
Back to top
Paul Nicholls
Guest





PostPosted: Fri Sep 29, 2006 3:37 am    Post subject: Re: Retrieve Delphi class properties/methods information fro Reply with quote

"rbwinston" <rbwinston (AT) mindspring (DOT) com> wrote in message
news:boanh2lm53ho6fo72fqif95dtr80fj0ud7 (AT) 4ax (DOT) com...
Quote:
You could take a look at PasDoc and try modifying it to do what you
want.

http://pasdoc.sipsolutions.net/


Thanks, I will try that :)

cheers,
Paul.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Thirdparty Tools (General) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.