2005-10-26 07:37:34 +02:00
|
|
|
@echo off
|
|
|
|
rem doflex.cmd prefix mode target source
|
|
|
|
rem mode - either debug or release
|
|
|
|
rem target - generated parser file name without extension
|
|
|
|
rem source - input to bison
|
|
|
|
|
|
|
|
if "%1"=="debug" (set flags=-t) else (set flags=-t)
|
|
|
|
|
2005-10-27 03:10:36 +02:00
|
|
|
rem Test for presence of flex.
|
|
|
|
flex --help >NUL
|
|
|
|
if errorlevel 1 goto noflex
|
|
|
|
|
|
|
|
rem Run flex.
|
2005-10-26 07:37:34 +02:00
|
|
|
flex %flags% >%2.cpp %3
|
2005-10-27 03:10:36 +02:00
|
|
|
exit
|
2005-10-26 07:37:34 +02:00
|
|
|
|
2005-10-27 03:10:36 +02:00
|
|
|
:noflex
|
|
|
|
echo Flex not found. Using pre-generated files.
|
2006-02-14 07:12:08 +01:00
|
|
|
copy %~pn3.cpp.cvs %2.cpp
|
2005-10-27 03:10:36 +02:00
|
|
|
exit
|