title: ANTLR mismatched input
body: <p>I have a simple grammar like this:</p>
  
  <pre><code>grammar mygrammar;
  
  the_rule : 'abc' 'xyz' ;
  
  WS  :  [ \t\r\n\u000C]+ -&gt; channel(HIDDEN) ;
  </code></pre>
  
  <p>When I parse the text "abc xyz" with the_rule(), I get the expected string tree representation:</p>
  
  <pre><code>(the_rule abc xyz)
  </code></pre>
  
  <p>However, then I add the following lexer rule, which I think means "anything except for a w":</p>
  
  <pre><code>TEXT : ~[w]+ ;
  </code></pre>
  
  <p>Now when I parse the text "abc xyz" with the_rule(), I get an error:</p>
  
  <pre><code>line 1:0 mismatched input 'abc xyz' expecting 'abc'
  </code></pre>
  
  <p>Why would the TEXT lexer rule affect this?  I think I'm misunderstanding something simple.  :-(</p>