mirror of https://github.com/ecmwf/eccodes.git
18 lines
471 B
Plaintext
Executable File
18 lines
471 B
Plaintext
Executable File
set -xe
|
|
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
|
|
|
|
yacc -v -d griby.y
|
|
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
|
|
echo
|
|
echo ALL OK
|