Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to manipulate C# AST?
    text
    copied!<p>I am working on a Reverse Engineering school project, which requires to translate manipulate AST of compiled C# project. I have seen the post on "Translate C# code into AST?" in this website, but it doesn't look like the one I am looking for. According to what I knew, currently C# doesn't provide a library class that does sth like that for Java: <a href="http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.cdt.doc.isv/reference/api/org/eclipse/cdt/core/dom/ast/ASTVisitor.html" rel="nofollow noreferrer">http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.cdt.doc.isv/reference/api/org/eclipse/cdt/core/dom/ast/ASTVisitor.html</a> If there is such library class in C#, everything here is solved.</p> <p>I have consult with someone, and here are the possible solutions. But I have problems with working out on the solutions as well. 1) Find another compiler that provides a library which allows its AST to be expose for manipulation. But I can't find a compiler like that. 2) Use ANTLR Parser Generator to come out with my own compiler that does that (tt will be a much more difficult and longer process). The download there provides sample grammars for different languages but not C# (it has grammars written in various languages including C# but not to produce C# grammar). Hence the problem is I can't find C# grammar.</p> <p>What is shortest and fastest way to approach this issue? If I really hv to take one of the alternative above, how should I go abt solving those problems I faced.</p> <p>Would be very thankful to u if u can help me to get my problem solved!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload