Search code examples
c#ecma

How to implement C# syntax to use with own platform? ECMA Standard


I want to know, is this possible to use C# language syntax in own platform? I know that C# is ECMA standartized language. So how can it be implemented?

I know there are examples such as Mono & Unity3D who implemented C#.

So for example : One common class library (own, written in C) & C# as a programming language.

The problem is that I never did that before, so I am interested what should I read & where to start. Any other articles about implementing syntax will be good.


Solution

  • imho there are a very few cases when you need to write your on parser / compiler etc.

    I would do it in a different way.

    First option would be to run .Net from your C application. You can for instance use Mono for that. Here is a description: http://www.mono-project.com/Embedding_Mono

    The second option would be to use your c class library directly from C# applications. Check http://www.pinvoke.net/ for example on how to declare them.