title: Antlr grammar unpredicted behavior
body: <p>I've begun experimenting with ANTLR3 today. There seems to be a discrepency in the expressions that I use.</p>
  
  <p>I want my class name to start with a capital letter, followed by mixed case letters and numbers. For instance, <code>Car</code> is valid, <code>8Car</code> is invalid.</p>
  
  <pre><code>CLASS_NAME : ('A'..'Z')('a'..'z'|'A'..'Z'|'0'..'9')*;
  </code></pre>
  
  <p>This works fine when I test it individually. However when I use it in the following rule,</p>
  
  <pre><code>model
      : '~model' CLASS_NAME model_block
      ;
  </code></pre>
  
  <p>However, the <code>CLASS_NAME</code> begins to pick up class names beginning with numbers as well. In this case, ANTLR picks up <code>Car</code>, <code>8Car</code> or even <code>#Car</code> as valid tokens. I'm missing something silly. Any pointers would be appreciated. Thanks.</p>