title: How to implement LOOP in a FORTH-like language interpreter written in C
body: <p>I'm writing a simple stack-based language in C and was wondering how I should go about implementing a loop structure of some kind, and/or lookahead symbols. Since the code is a bit long for this page (over 200 lines) I've put it in <a href="https://github.com/tekknolagi/StackBased" rel="noreferrer">a GitHub repository</a>.</p>
  
  <p>EDIT: The main program is in file <code>stack.c</code>.</p>
  
  <p>EDIT: The code just takes in input in <code>words</code>, kind of like FORTH. It uses <code>scanf</code> and works left to right. Then it uses a series of <code>if</code>s and <code>strcmp</code>s to decide what to do. That's really it.</p>