Here, there is no complex compilation principle, I just want to make some instructions on the Basic interpreter I have written, maybe I can inspire you to think about such software.
First step. Less method analysis
Simply put in extracting words from the source file, installing into a container (such as the carray in the Vector, MFC). For example, there is such a program if a> b Then A = B So the extraction word is "IF", " A ","> "," b "," life "," a "," = "," b "put them into a container to prepare for future operation.
Step 2. Run
Let's run it directly, no longer doing a complex analysis work.
It is also very simple to run. First, I will analyze the words in a word, Inti-I = 0; I
You can find my Basic Interpreter source code in 9cbs.