title: Generate an AST in C++
body: <p>I'm making an interpreter in C++, so far I've got my lexer to generate tokens. The problem is I'm not sure how to generate an "walk" a parse tree.</p>
  
  <p>I was thinking of making my parse tree using an array of arrays, but I'm not sure how to actually insert the tokens into the parse tree in the correct order.</p>
  
  <p>I'm not sure whether or not to go top-down, left-right or bottom-up, right-left.</p>
  
  <p>Can anyone provide me with a simple LALR(1) algorithm?</p>