Hello,
I've already tried to develop languages using C and C++, but how can I create a interpreted language using C#? Thanks.
PS: I want to build it to run in Windows Mobile devices.
Hello,
I've already tried to develop languages using C and C++, but how can I create a interpreted language using C#? Thanks.
PS: I want to build it to run in Windows Mobile devices.
Well... what have you tried in C and C++?
Developing a language isn't exactly childs play. Do you understand lexical analysis? Do you understand different types of parsers? Where an LR parser might be more appropriate than an LALR parser? Or vice-versa? Do you understand context free grammars? Regular expressions?
That doesn't even begin to cover code generation, optimization, etc... (which may not all apply for an interpreted language, but you're still going to want to know a thing or two about them before you dive in).
You seem to be familiar with compiler construction, so I'll just point to the tools: MPLEX and MPPG are respectively scanner and parser generators that generate a lot of what you need to build a compiler or interpreter using the C# language.
It seems that more documentation can be found in the .NET SDK, but I don't have it at hand so I'll just leave a pointer to MSDN.
If you want an interpreteded language developing it for C# is no different than developing it in C or C++.
If you want to compile to a (.Net) compiled language then .Net offers lots of possibilities through System.Reflection.Emit.