title: How to get antlr grammar recognize strings with white space?
body: <p>I am trying to write a grammar in antlr4. But i am not able to selectively ignore whitespaces in my rules. Attaching my grammar. Here I should allow a space(a token of WHITESPACE) if the token matches alphaNumericWSC but at all other places i want to skip the WHITESPACE. </p>
  
  <pre><code>WHITESPACE  :   [ \t\n\r]+ -&gt; skip
  alphaNumericWSC : AlphaNumeric (',' AlphaNumeric)* 
                  | AlphaNumeric ('  ' AlphaNumeric)*
                  ;
  </code></pre>
  
  <p>In other words I want to not ignore the whitespace only in this rule alphaNumericWSC.</p>
  
  <p>Thanks in advance for the help.</p>