www.delorie.com/gnu/docs/bison/bison_103.html   search  
Buy the book!

Bison 1.875

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.3 Yacc Library

The Yacc library contains default implementations of the yyerror and main functions. These default implementations are normally not useful, but POSIX requires them. To use the Yacc library, link your program with the `-ly' option. Note that Bison's implementation of the Yacc library is distributed under the terms of the GNU General Public License (see section GNU GENERAL PUBLIC LICENSE).

If you use the Yacc library's yyerror function, you should declare yyerror as follows:

int yyerror (char const *);

Bison ignores the int value returned by this yyerror. If you use the Yacc library's main function, your yyparse function should have the following type signature:

int yyparse (void);

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003