llvm.org GIT mirror llvm / release_23 win32 / doflex.cmd
release_23

Tree @release_23 (Download .tar.gz)

doflex.cmd @release_23raw · history · blame

@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)

rem Test for presence of flex.
flex --help >NUL
if errorlevel 1 goto noflex

rem Run flex.
flex %flags% >%2.cpp %3
exit

:noflex
echo Flex not found.  Using pre-generated files.
copy %~pn3.cpp.cvs %2.cpp
exit