If i understand the question correctly, the idea is that when you write your program and hit compile, the compiler takes what you've written and 'translates' it into machine code. So if you write
int main()
{
int myinteger = 1;
..
}
Then the compiler will construct the machine code necessary to define this 'main' function and within it, put a value we interpret as '1' in a 32-bit register and move it to an allocated area 32-bits wide on the stack. Or something, for example. Rinse and repeat for the entire C++ syntax . That I imagine is how it was done, constructing it step by step. A lot of it was done on top of existing C syntax so some of the 'basic' groundwork was done in that respect.
Thinking a bit more, you're right it's certainly a mammoth task thinking about how much there is in C++!
This might give you a little more information on programming language design, but the main thing you would want to study is Compiler design for how to create programming languages. People often fear these courses at University. Lets Build a Compiler
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.