title: Call flex yy_push_state() from bison parser
body: <p>Is it possible to call <code>yy_push_state()</code> from a bison generated parser? How can this be done?</p>
  
  <pre><code>context:
      /* empty */ { $$ = NULL; yy_push_state(SOME_STATE); }
  ;
  
  rule:
      context operator STRING { create_expr($2, $3); }
  ;
  </code></pre>
  
  <p>I would like to be able to call <code>yy_push_state()</code> from parser and also would like to know if it's an acceptable practice. If not, what are the alternatives to communicate lexer it should push a state?</p>
  
  <blockquote>
    <p>In this specific case, only the parser knows when to push <code>SOME_STATE</code>.</p>
  </blockquote>