2 rem doflex.cmd prefix mode target source
3 rem mode - either debug or release
4 rem target - generated parser file name without extension
5 rem source - input to bison
7 if "%1"=="debug" (set flags=-t) else (set flags=-t)
9 rem Test for presence of flex.
11 if errorlevel 1 goto noflex
14 flex %flags% >%2.cpp %3
18 echo Flex not found. Using pre-generated files.
19 copy %~pn3.cpp.cvs %2.cpp