title: How can I write an alias of Raku regexes?
body: <p>I wrote a grammar like this:</p>
  <pre><code>grammar StatementFormat {
      token TOP { (&lt;plain&gt; | '%' &lt;placeholder&gt;)* }
  
      token plain { &lt;-[%]&gt; }
  
      token placeholder {
          | &lt;verb&gt;
          | &lt;noun&gt;
          | &lt;adverb&gt;
      }
  
      token verb {
          'v'
          {
              # some actions
          }
      }
  
      token noun {
          'n'
          {
              # some actions
          }
      }
  
      token adverb {
          'a'
          {
              # some actions
          }
      }
  }
  </code></pre>
  <p>So I could use it to parse strings like &quot;someone %v %n %a&quot;.</p>
  <p>However, I found there were so many usages like &quot;%v %n %a&quot;, I'd like to give it an alias, say, &quot;%b&quot; such that parsing &quot;someone %b&quot; is equivalent to parsing &quot;someone %v %n %a&quot;.</p>
  <p>So is there a way to do that?</p>
  <p>Of course, <code>token alias { 'b' { ... } }</code> can do that. But in that way I need to repeat that action code. I am wondering if there exists a simpler way.</p>