I am trying to understand how a language interpreter works. Can you guys point me the general lines on how an interpreter works?
I mean, suppose I have some lines written like this
10  x = 200;
20  for r = x to 1000 step 1
25  z = r + 32;
30  print z;
40  next r;
50  end;
what's the best way to build an interpreter that could run something like that?
Having a large matrix containing all functions allowed and searching for a match? The first line, for example: it is assigning 200 to a variable x, but these are symbols that does not exist.
If you guys can give me the direction...
Thanks for any help.
 
     
     
     
     
     
     
    