Can you make clear what is the language of the interpreter program and what is the interpreted language ? is it C++ for both ?
Quote:
but this process is not memory efficient
Memory efficiency is certainly not the worst problem.
intArray
takes only a few kilo bytes when your PC holds a few Giga bytes of of RAM.
As Sergey commented, storing language variables needs much more features than what a simple flat list can offer. Not only this, but the details of the interpreter matters too.
to make an interpreter, you need to use a number of techniques including a compiler. Storing the variables is just one piece of the puzzle.
Compilers: Principles, Techniques, and Tools - Wikipedia, the free encyclopedia[
^]
[Update]
Quote:
the language is my own ..lol yeah i'm making a new language for kids with simple syntax.
Your toy language characteristics imply the variables behavior and thus the needed organization to handle variables.
Quote:
Quote:
Only interpreted .. i don't think I'm going to make a compiler. Please suggest the stuff i need to learn.
An interpreter is mainly made of 2 parts
- The first part is in charge of reading kids source code and translate to another form often called Pcode or Intermediate code. This part is a compiler.
- The second part is the one that run the intermediate code.