title: Why can't anything go in the body of a Perl 6 grammar proto?
body: <p>When declaring a proto, it's possible to surround the multimethod/sub code with additional code.  For a silly example:</p>
  
  <pre><code>proto sub foo(|) { 'Camelia says “' ~ {*} ~ '!”' }
  multi sub foo(1) { "hi"  }
  multi sub foo($) { "bye" }
  
  say foo(1) # Camelia says “hi!”
  </code></pre>
  
  <p>I haven't come across any times (yet) where I've felt that's hugely useful, but on the flipside, I <em>have</em> come across some where in regex/Grammar world where I occasionally find myself repeating myself throughout all of the proto tokens — it's not that I can't shift into a separate token, but that adds an extra layer of hierarchy and actions.  Compare a hypothetical</p>
  
  <pre><code>grammar Bar { 
     token TOP { &lt;meta&gt;* }
     token metastart { '#' }
     proto token meta { &lt;metastart&gt; {*} }
           token meta:name { ( \w* ) }
           token meta:date { (\d**6) }
  }
  </code></pre>
  
  <p>Where they only action methods necessary besides <code>TOP</code> would be <code>meta:name</code>and <code>meta:date</code> to</p>
  
  <pre><code>grammar Bar { 
     token TOP { &lt;meta&gt;* }
     token metastart { '#' }
     token meta { &lt;metastart&gt; &lt;metacontent&gt; }
  
     proto token metacontent      {   *   }
           token metacontent:name {  \w*  }
           token metacontent:date { \d**6 }
  }
  </code></pre>
  
  <p>This now requires three methods: <code>metacontent:name</code>, <code>metacontent:date</code> and then a fairly superfluous <code>meta</code> whose entire body would just be <code>make $&lt;metacontent&gt;.made</code>.</p>
  
  <p>Although I've seen documentation / comments floating around saying you can toss in code in the protos inside of a grammar, if <em>anything</em> is placed in the body of a proto token/regex/rule other than a single <code>*</code>, then the compiler complains: <code>Proto regex body must be {*} (or &lt;*&gt; or &lt;...&gt;, which are deprecated)</code></p>
  
  <p>Is this an as-yet unimplemented features or is the plan to no longer allow anything in the proto?  And if it's the latter, why should the <code>proto</code> designator be required?  (I'm guessing it's because there's something special about how proto token/regex/rule dispatches, since removing proto inside of a grammar results in runtime failures unlike in the sub/method world.</p>