#!/bin/sh

echo "generating bison-code"

bison -d boil.y
echo "extern YYSTYPE yyval;" >> boil.tab.h
mv boil.tab.c boil.tab.cc

# YYSTYPE yyval must be global

sed -e "s/YYSTYPE yyval;//g" boil.tab.cc > boil.tab.cc1
mv boil.tab.cc1 boil.tab.cc

sed -e "s%/. The user can define YYPARSE_PARAM%YYSTYPE yyval;/* The user can define YYPARSE_PARAM%g" boil.tab.cc > boil.tab.cc1
mv boil.tab.cc1 boil.tab.cc
