2017-08-17 16:08:55 +00:00
|
|
|
set -xe
|
2015-12-30 14:31:45 +00:00
|
|
|
export LEX=flex
|
|
|
|
export LEX_OUT=gribl.c
|
|
|
|
$LEX -o gribl.c gribl.l
|
|
|
|
sed 's/yy/grib_yy/g' < $LEX_OUT | sed 's/static void grib_yyunput/void grib_yyunput/' > grib_lex1.c
|
|
|
|
sed 's/fgetc/getc/g' < grib_lex1.c > grib_lex.c
|
|
|
|
rm -f grib_lex1.c
|
|
|
|
rm -f $LEX_OUT
|
2016-01-29 11:07:59 +00:00
|
|
|
|
2016-07-04 10:52:09 +00:00
|
|
|
yacc -v -d griby.y
|
2016-01-29 11:07:59 +00:00
|
|
|
sed 's/yy/grib_yy/g' < y.tab.c > grib_yacc1.c
|
|
|
|
sed 's/fgetc/getc/g' < grib_yacc1.c > grib_yacc.c
|
|
|
|
rm -f grib_yacc1.c
|
|
|
|
sed 's/yy/grib_yy/g' < y.tab.h > grib_yacc.h
|
|
|
|
rm -f y.tab.c y.tab.h
|
2017-08-17 16:08:55 +00:00
|
|
|
echo
|
|
|
|
echo ALL OK
|