title: Simple yacc grammars give an error
body: <p>I have a question for yacc compiler. I do not compile simple yacc grammar. Here is the code section  : </p>
  
  <pre><code>/*anbn_0.y */
  %token A B
  %%
  start: anbn '\n' {printf(" is in anbn_0\n");
  return 0;}
  anbn: empty
  | A anbn B
  ;
  empty: ;
  %%
  #include "lex.yy.c"
  yyerror(s)
  char *s;
  { printf("%s, it is not in anbn_0\n", s);
  </code></pre>
  
  <p>I use mac os x and, i try yo command;
  <code>$ yacc anbn_0.y</code> and then 
  <code>$ gcc -o anbn_0 y.tab.c -ll</code> and give me error. Here is the error ;</p>
  
  <pre><code>warning: implicit declaration of function 'yylex' is invalid in C99 [-Wimplicit-function-declaration]
        yychar = YYLEX;
  </code></pre>
  
  <p>Why do I get an error ?</p>