473,396 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

CodeParser

is there any class that can parse the source code? I tried with ICodeParser,
but I can't make it...

Whats the best way to parse source?
example: the user of my application enters his source into textbox, and i
want to parse it and display summary... how to do that?

any hints?

thx
--
Je**@programeri.org @ www.programeri.org
Nov 16 '05 #1
4 3444
Hi Jeti.
I haven't done this, but here are some suggestions.
You can compile the source using Microsoft.CSharp.Compiler.
Compiler wrappers for VB and JScript are also provided.
Once you have compiled the source to a file, you can use System.Reflection,
to extract the data you need from the assembly.
Or better yet, when compiling, generate xml doc for the assembly and use it.
Hope this gives you some direction.
Sharon.

"Jeti" <Je**@programeri.org> wrote in message
news:eO**************@TK2MSFTNGP10.phx.gbl...
is there any class that can parse the source code? I tried with ICodeParser, but I can't make it...

Whats the best way to parse source?
example: the user of my application enters his source into textbox, and i
want to parse it and display summary... how to do that?

any hints?

thx
--
Je**@programeri.org @ www.programeri.org

Nov 16 '05 #2
> Hi Jeti.
I haven't done this, but here are some suggestions.
You can compile the source using Microsoft.CSharp.Compiler.
Compiler wrappers for VB and JScript are also provided.
Once you have compiled the source to a file, you can use System.Reflection, to extract the data you need from the assembly.
Or better yet, when compiling, generate xml doc for the assembly and use it. Hope this gives you some direction.
Sharon.


Sharon, thanx for reply, but I want to extract detailed data from source
(metadata attributes, mathod params, class & struct definitions, etc...) and
i doubt it i can do it this way... I thin that generated xml doc contains
only relevant and short data...

anyway, thanx for the idea, i'll try to do it that way, maybe it will do...
Nov 16 '05 #3
> Sharon, thanx for reply, but I want to extract detailed data from source
(metadata attributes, mathod params, class & struct definitions, etc...) and i doubt it i can do it this way... I thin that generated xml doc contains
only relevant and short data...
I think you can do all that using Reflection.
Xml doc also should contain all this data.
But maybe you'll find some lite code parser that works better.
Try this one:
http://www.codeproject.com/csharp/codedomparser.asp
"Jeti" <Je**@programeri.org> wrote in message
news:uh**************@TK2MSFTNGP12.phx.gbl...
Hi Jeti.
I haven't done this, but here are some suggestions.
You can compile the source using Microsoft.CSharp.Compiler.
Compiler wrappers for VB and JScript are also provided.
Once you have compiled the source to a file, you can use

System.Reflection,
to extract the data you need from the assembly.
Or better yet, when compiling, generate xml doc for the assembly and use

it.
Hope this gives you some direction.
Sharon.


Sharon, thanx for reply, but I want to extract detailed data from source
(metadata attributes, mathod params, class & struct definitions, etc...)

and i doubt it i can do it this way... I thin that generated xml doc contains
only relevant and short data...

anyway, thanx for the idea, i'll try to do it that way, maybe it will do...

Nov 16 '05 #4
Hi,

There's a free (AFAIR) parser library called GoldParser written in C# which
should have rule sets for C# and VB .NET. You indeed cannot use ICodeParser
since its implementation is not exposed to the general public.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Jeti" <Je**@programeri.org> wrote in message
news:eO**************@TK2MSFTNGP10.phx.gbl...
is there any class that can parse the source code? I tried with ICodeParser, but I can't make it...

Whats the best way to parse source?
example: the user of my application enters his source into textbox, and i
want to parse it and display summary... how to do that?

any hints?

thx
--
Je**@programeri.org @ www.programeri.org


Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: John Mark Howell | last post by:
BlankCan anyone give me an idea as to how to use the CodeDom to edit code? I would like to perform mass changes (such as putting logging messages as the first statement in all methods with method...
3
by: Paul Fi | last post by:
i want to know how i can get a reference to the VS.NET built-in codeparser, from what i believe that VS.NET's codeparser has some implementation of the parse method of the icodeparser, is that...
3
by: jack | last post by:
Trying to make a utility that - Reads a VB.Net source file - Parses it into it's constuent parts - Evaluates and modifies as required - Saves the source I thought that the CodeDom and the...
1
by: Toni | last post by:
Where can I find BBCode editor (editor for forums and blogs) for ASP.NET. I need editor like FreeTextBox (but BBCode, not HTML like FreeTextBox). I need source code or control. Where can I find it?...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.