title: Writing BASIC interpreter in java - loops and ifs
body: <p>This paper: <a href="http://www.codeproject.com/Articles/345888/How-to-write-a-simple-interpreter-in-JavaScript" rel="nofollow">http://www.codeproject.com/Articles/345888/How-to-write-a-simple-interpreter-in-JavaScript</a> helped me greatly in terms of engineering parsing and write instructions, however it does not explain how to write loops and ifs. Can you point me to some papers about that? While adding predefined functions, etc. is easy, especially since my BASIC dialect will be very oldschool one with mandatory line numbers, requirement for using LET to set variables, etc. and very fixed syntax (i.e. no ':' to separate instructions, only one instruction per line, no whitespaces allowed for parameter separation so 10 LET variable,value is valid, but 10 LET variable, value is not)?</p>
  
  <p>On second thought maybe ifs will be easy, but there's still problem on how to do for..next loop (my interpreter won't use whiles/do..whiles, only oldschool gotos/gosubs).</p>