title: can Flex return a string match to bison
body: <p>I'm writing a Bison/Flex program to convert LaTeX into MathML.  At the moment, dealing with functions (i.e. \sqrt, \frac, etc) works like this, with a token for every function</p>
  
  <pre><code>\\frac         {return FUNC_FRAC;}
  </code></pre>
  
  <p>and passes the token FUNC_FRAC back to bison, which plays its part in the description of this subtree:</p>
  
  <pre><code>function: FUNC_FRAC LBRACE atom RBRACE LBRACE atom RBRACE {$$ = "&lt;mfrac&gt;" + $3 + $6 + "&lt;/mfrac&gt;";}
  </code></pre>
  
  <p>But this means that I need to define and juggle a potentially unlimited number of tokens.  What I would like to do is something like this, which doesn't work as written.  In flex:</p>
  
  <pre><code>\\[A-Za-z]+[0-9]*  {return the-matched-string;}
  </code></pre>
  
  <p>and in bison:</p>
  
  <pre><code>function: "\frac" LBRACE atom RBRACE LBRACE atom RBRACE {$$ = "&lt;mfrac&gt;" + $3 + $6 + "&lt;/mfrac&gt;";}
  </code></pre>