I’ve been looking around and have probably just not been able to put the right terms in my search, since I don’t know what this would be called. I skimmed over building interpreters, but I don’t think that’s what I want.
Lets say I wanted to use C++’s basic syntax in Visual C++ (2010, if it really matters), but compile it into my own format. So I’d take:
if(myVar == 1)
And instead of letting VC++ assemble it, I could somehow override that (without having to build my own damn compiler) to my own byte code like this:
1F00EE01
Where in my imaginary byte code language, 1F represents IF, 00 is the variable number (in some determined order of variables), EE is the operator ‘equals’ and 01 plays it’s natural role.
Obviously it would get a bit more complex than that, but for now I’m just speculating. Just searching for any way to use VC++’s parsing of an already well-built language instead of creating my own and changing the result of compilation. Now that I write it down, the thought seems ridiculous, still, hopefully any responses will still be interesting enough though.
MSVC has a built in compiler and there is no way of changing that.
It has a list of possible target platforms that is not extendable either.