When using lex and yacc, please note the following:
Programs generated by yacc or lex can have many unreachable break statements, causing multiple C++ warnings.
If you want to call the yacc generated routines, yyerror, yylex and yyparse, your program must include the yacc.h header file.
#include <yacc.h>