title: Antlr Arrow Syntax
body: <p>I found this syntax in an Antlr <a href="https://github.com/crashub/bash" rel="noreferrer">parser for bash</a>:</p>
  
  <pre><code>file_descriptor
      :   DIGIT -&gt; ^(FILE_DESCRIPTOR DIGIT)
      |   DIGIT MINUS -&gt; ^(FILE_DESCRIPTOR_MOVE DIGIT);
  </code></pre>
  
  <p>What does the <code>-&gt;</code> syntax do?</p>
  
  <p>What is it called such that I can google it to read about it?</p>
  
  <p>The 'Definitive Guide to Antlr4' only has one page about it.  It refers to "lexer command", but it never names the operator.  The usage in the book differs from the usage in the bash parser.</p>