blob: 5c0629d092b319c241641e55380c5a1df5f67b3f [file] [log] [blame]
Jeff Cohen4ed1de82005-10-26 05:37:34 +00001@echo off
2rem doflex.cmd prefix mode target source
3rem mode - either debug or release
4rem target - generated parser file name without extension
5rem source - input to bison
6
7if "%1"=="debug" (set flags=-t) else (set flags=-t)
8
9rem Try and run flex. If it is present, great.
10flex %flags% >%2.cpp %3
11if errorlevel 1 goto error
12goto done
13
14:error
15echo Flex could not run. Using pre-generated files.
16copy %~pn3.cpp %2.cpp
17
18:done
19exit 0