c -> c# translation, tools

1.6k views Asked by At

I want to translate a C application to .Net and thinking on how to automate the task. I don't need to "parse" and compile C files, rather I want to re-create a project structure, create a .Net classes corresponding the C files etc. Is there a sense to look at YACC/LEX tools and other parser generators? If I be able to create an AST from C code, maybe I can get a C# code from it?

1

There are 1 answers

4
Ron Harlev On

Found code2code to convert from c++ from

On second thought:
In general, you are most likely to benifit from redesigning the implementation and rewriting the code in C#. Many things that used to be many lines in C could be sometimes just one line when you use the power of the .NET libraries. You would get a smaller, more efficient and easier to mange code base.