title: What does $1 and $3 in a OCaml parser indicate?
body: <p>Here's the sample code of an OCaml parser:</p>
  
  <pre><code>%{ open Ast %}
  
  %token PLUS MINUS TIMES DIVIDE EOF
  %token &lt;int&gt; LITERAL
  
  %left PLUS MINUS
  %left TIMES DIVIDE
  
  %start expr
  %type &lt; Ast.expr&gt; expr
  
  %%
  
  expr:
    expr PLUS   expr { Binop($1, Add, $3) }
  | expr MINUS  expr { Binop($1, Sub, $3) }
  | expr TIMES  expr { Binop($1, Mul, $3) }
  | expr DIVIDE expr { Binop($1, Div, $3) }
  | LITERAL          { Lit($1) }
  </code></pre>
  
  <p>I have the code for the scanner and AST (Abstract Syntax Tree) too. 
  What does $1 and $3 here indicate?</p>
  
  <p><strong>ADDENDUM:</strong>
  I want to assign a value to a variable. 
  I also want to store the values of all the variables in an array. 
  How can I do that?</p>