title: JavaScript Grammar: for/for-in loop rules?
body: <p>I am writing a JavaScript parser, but the grammar rules for <code>for</code> loops is a bit confusing. <a href="http://www.antlr.org/grammar/1153976512034/ecmascriptA3.g" rel="nofollow">From the specs</a>:</p>
  
  <pre><code>'for' LPAREN (
      (expressionNoln)? SEMI (expression)? SEMI (expression)? RPAREN statement
      | 'var' variableDeclarationListNoln SEMI (expression)? SEMI (expression)? RPAREN statement
      | leftHandSideExpression 'in' expression RPAREN statement
      | 'var' variableDeclarationNoln 'in' expression RPAREN statement
      )
  </code></pre>
  
  <p>I'm trying to figure out what the difference between <code>expressionNoln</code> and just a regular <code>expression</code>. And, in the process, figure out what's going on with <code>variableDeclartionNoln</code> and <code>variableDeclartionListNoln</code>.</p>
  
  <p>The only difference I've found is a bit further down, between <code>relationalExpression</code> and <code>relationalExpressionNoln</code>. The latter rule is missing the <code>in</code> operator.</p>
  
  <p>Did I get that right, or am I just confused?</p>