title: Parsing multiline strings with antlr
body: <p>I have a grammar that looks like this:</p>
  
  <pre><code>a: b c d ;
  b: x STRING y ;
  </code></pre>
  
  <p>where</p>
  
  <pre><code>STRING: '"' (~('"' | '\\' | '\r' | '\n') | '\\' ('"' | '\\'))* '"';
  </code></pre>
  
  <p>And my file contains one 'a' production in each line so I'm currently dropping all newlines. I would however want to parse multiline strings, how can I do that? It doesn't work if I just allow '\r' and '\n' inside the string.</p>