title: How can flex return multiple terminals at one time
body: <p>In order to make my question easy to understand I want to use the following example:</p>
  
  <p>The following code is called <strong>nonblock do-loop</strong> in fortran language</p>
  
  <pre><code>DO 20 I=1, N      ! line 1
  DO 20 J=1, N      ! line 2
      ! more codes
  20  CONTINUE      ! line 4
  </code></pre>
  
  <p>Pay attention that the label <code>20</code> at line 4 means the end of <strong>both</strong> the inner do-loop and the outer do-loop.</p>
  
  <p>I want my flex program to parse the feature correctly: when flex reads the label <code>20</code>, it will return <code>ENDDO</code> terminal twice. </p>
  
  <p>Firstly, because I also use bison, so every time bison calls <code>yylex()</code> to get one terminal. If I can ask bison to get terminals from <code>yylex()</code> in some cases, and from another function in other cases, maybe I could solve this problem, however, I got no idea here then.</p>
  
  <p>Of course there are some workarounds, for eample, I can use flex's start condition but I don't think it is a good solution. So I ask if there's any way to solve my question without a workaround?</p>