aboutsummaryrefslogtreecommitdiffstats
path: root/win32/doflex.cmd
blob: b39d40b75393acf25678dc0f0321724d7e43fc3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
@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 %2.cpp
exit