2003-07-03 04:12:11 +02:00
|
|
|
|
|
|
|
@echo off
|
|
|
|
|
|
|
|
@echo.
|
2003-08-03 21:20:33 +02:00
|
|
|
|
|
|
|
@call setenvvar.bat
|
|
|
|
@if errorlevel 1 (goto :END)
|
|
|
|
|
2003-07-03 04:12:11 +02:00
|
|
|
@set PARSER=
|
|
|
|
@set SED=
|
|
|
|
@call :CHECKTOOLS
|
|
|
|
@if "%PARSER%" == "" ((goto :HELP_TOOLS) & (goto :EOF))
|
|
|
|
@if "%SED%" == "" ((goto :HELP_TOOLS) & (goto :EOF))
|
|
|
|
|
|
|
|
@if "%PARSER%" == "YACC" (call :YACC_PROC) else (call :BISON_PROC)
|
|
|
|
@call :SED_PROC
|
|
|
|
@goto :END
|
|
|
|
|
|
|
|
::=====================================
|
|
|
|
:CHECKTOOLS
|
|
|
|
:: verify our unix tool set is available
|
|
|
|
|
|
|
|
@bison --help > nul 2>nul
|
|
|
|
@if not errorlevel 9009 ((set PARSER=BISON) & (goto :sed_pro))
|
|
|
|
|
|
|
|
@yacc --help > nul 2> nul
|
|
|
|
@if not errorlevel 9009 ((set PARSER=YACC) & (goto :sed_pro))
|
|
|
|
|
|
|
|
:sed_pro
|
|
|
|
@sed --help > nul 2> nul
|
|
|
|
@if not errorlevel 9009 (set SED=TRUE)
|
|
|
|
|
|
|
|
@goto :EOF
|
|
|
|
|
|
|
|
::=====================================
|
|
|
|
:BISON_PROC
|
|
|
|
@set PARSER=BISON
|
|
|
|
@echo .
|
|
|
|
@echo Processing with bison
|
2003-07-05 05:23:11 +02:00
|
|
|
@bison -y -l -d -b dsql %ROOT_PATH%\src\dsql\parse.y
|
2003-07-03 04:12:11 +02:00
|
|
|
@goto :EOF
|
|
|
|
|
|
|
|
::=====================================
|
|
|
|
:YACC_PROC
|
|
|
|
@set PARSER=YACC
|
|
|
|
@echo .
|
|
|
|
@echo Processing with yacc
|
2003-07-05 05:23:11 +02:00
|
|
|
@yacc -l -d -b dsql %ROOT_PATH%\src\dsql\parse.y
|
2003-07-03 04:12:11 +02:00
|
|
|
@goto :EOF
|
|
|
|
|
|
|
|
::=====================================
|
|
|
|
:SED_PROC
|
|
|
|
@echo .
|
|
|
|
@echo Processing with sed
|
2003-07-05 05:23:11 +02:00
|
|
|
@sed -f %ROOT_PATH%\src\dsql\parse.sed <dsql.tab.c >%ROOT_PATH%\src\dsql\parse.cpp
|
|
|
|
@copy dsql.tab.h %ROOT_PATH%\src\dsql\dsql.tab.h > nul
|
2003-07-03 04:12:11 +02:00
|
|
|
@del dsql.tab.c
|
|
|
|
@del dsql.tab.h
|
|
|
|
@goto :EOF
|
|
|
|
|
|
|
|
::=================
|
|
|
|
:HELP_TOOLS
|
|
|
|
@echo:
|
|
|
|
@echo Please check that these utilities programs are
|
|
|
|
@echo all on your path:
|
|
|
|
@echo:
|
|
|
|
@echo sed.exe
|
|
|
|
@echo bison.exe or yacc.exe (only one needed)
|
|
|
|
@echo:
|
|
|
|
@echo If you do not have these utilities they may be downloaded
|
|
|
|
@echo from the following sites
|
|
|
|
@echo:
|
|
|
|
@echo sed.exe and bison 1.35 from http://gnuwin32.sourceforge.net/
|
|
|
|
@echo:
|
|
|
|
@echo byacc 1.9 from ftp://garbo.uwasa.fi/pc/unix/
|
|
|
|
@echo
|
|
|
|
@echo:
|
|
|
|
@goto :END
|
|
|
|
|
|
|
|
|
|
|
|
:END
|