title: Is it possible to set priorities for rules to avoid the "longest-earliest" matching pattern?
body: <p>Another simple question : is there any way to tell flex to prefer a rule that matches a short thing over a rule that matches a longer thing ? I can't find any good documentation about that.</p>
  
  <p>Here is why I need that : I parse a file for a pseudo language that contains some keywords corresponding to control instructions. I'd like them to be the absolute priority so that they're not parsed as parts of an expression. I actually need this priority thing because I don't have to write a full grammar for my project (that would be totally overkill in my case since I perform structural analysis on the program parsed, I don't need to know the details...), so I can't use a fine grammar tuning to be sure that those blocks won't be parsed into an expression.</p>
  
  <p>Any help will be appreciated.</p>
  
  <p>Here is an example of a file parsed :</p>
  
  <pre><code>If a &gt; 0 Then read(b); Endif
  c := "If I were...";
  While d &gt; 5 Do d := d + 1 Endwhile
  </code></pre>
  
  <p>I just want to collect info on the Ifs, Thens, Endifs etc... The rest doesn't matter to me. That's why I'd like the Ifs, Thens etc... related rules to be prioritized without to have to write a grammar.</p>