title: Differences between bison versions
body: <p>I am new to lexical analysis and parser generation, and I tried to start directly by compiling the bison example from <a href="http://en.wikipedia.org/wiki/GNU_bison" rel="nofollow">wikipedia</a>. This is an example of a reentrant parser.</p>
  
  <p>I tried to compile with 2 versions of bison: 2.5 and 2.6.5. The former compiles and executes perfectly, but the latter includes the type <code>yyscan_t</code> in the parser header which is declared in the lexer header (Lexer.h) (which I guess is required for reentrant features). Hence it does not compile <code>Parser.c</code> generated by <code>Parser.y</code></p>
  
  <p>Here is the extra part generated in <code>Parser.h</code> by 2.6.5 which is not present in 2.5:</p>
  
  <pre><code>#ifdef YYPARSE_PARAM
  #if defined __STDC__ || defined __cplusplus
  int yyparse (void *YYPARSE_PARAM);
  #else
  int yyparse ();
  #endif
  #else /* ! YYPARSE_PARAM */
  #if defined __STDC__ || defined __cplusplus
  int yyparse (SExpression **expression, yyscan_t scanner); // this line
  #else
  int yyparse ();
  #endif
  #endif /* ! YYPARSE_PARAM */
  </code></pre>
  
  <p>I've marked the line causing the problem. Any thoughts?</p>
  
  <p>Edit: What I need to do is to ensure that <code>yyscan_t</code> is declared in the header file generated by bison.</p>