[Mono-dev] Utilizing the C# Parser

Alexandre Miguel Pedro Gomes alexmipego at gmail.com
Fri Feb 3 19:33:07 EST 2006


I don't think any of it depends on GTK#. If I remeber well it doesn't depend
on the Project either. Since you don't want to resolve the elements and
things like that you want to check
monodevelop/Core/src/ICSharpCode.SharpRefactory and not
Extras\CSharpBinding\Parser.

The difference is that the CSharpBinding use ICSharpCode.SharpRefactory to
parse the documents and then "translate" it into Monodevelop AST tree (a
generic one so we can handle multiple languages) and resolve the items like
the types and namespaces. So, the bindings do use the Project class and its
friends so it can make the resolving.

So, use the ICSharp(...) and check the (...)Bindings to know how to use it
properly.

A side note: the ICSharpCode.SharpRefactory is GPL and comes from the
SharpDevelop project. I'm not sure, but SharpDevelop2 is beta right now and
it changed the license to LGPL... so seems a better choise, specially if
they already support C# 2.0 (aka generics and stuff like that :)).

On 2/3/06, lukas einkemmer <lukas.einkemmer at gmx.at> wrote:
>
> Hi
>
> > if you whish to get only the namespaces, classes, methods, etc... but
> > nothing about the code inside the methods, etc... I would suggest you to
> use
> > System.Reflection and/or Cecil
> unfortuenately reflection is not an option because I can not gurantee that
> the source code is compileable. I want i.e. takr file xy.cs and get the
> structure of it independently if the file depends on some other Classes or
> not.
> I mean you can parse i.e
> MyType func() {}
> without knowing what MyType exactly is (which I need to create an
> assembly).
>
>
> > Now, the reality is that MCS is not a library, and we do not make any
> > kind of guarantees about is API stability, and its also licensed under
> > the GPL which might be a problem if used in a commercial product.
> GPL is not a problem at all but I simply dont get it work at the moment.
>
> @Monodevelop Parser
> You are taling about the
> Core\src\MonoDevelop.Projects\MonoDevelop.Projects.Parser
> and the
> Extras\CSharpBinding\Parser
> classes right?
>
> I only took a glance at it but it looks promising.
> I saw that these Parser classes depends for example on the Project
> class but as long I am not using any of the gtk# gui I should have
> no probs get it running on windows too. right?
>
> thx
> Lukas
>
> --
> Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
> Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>



--
Alexandre Gomes, Portugal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060204/acf451b1/attachment.html 


More information about the Mono-devel-list mailing list