您的位置:首页 > 其它

windows 下 flex 命令行批处理文件

2010-08-19 21:32 423 查看
1. 通过cygwin 安装 flex

2. 新建一个命令行批处理文件调用flex

flex.bat

@set flex_dir="E:/SDK/cygwin/bin"
@set Path=Path;%flex_dir%
@REM flex command line
@REM Usage
@REM flex.bat %grammer_file_name
@REM
@REM flex parameters used in our command line
@REM --nounistd             not include unistd.h
@REM --never-interactive    the input is not interactive
@REM --noline               don't generate `#line' directives
@REM
@REM call flex
@echo ">>>>>>      flex parse begin...      >>>>>> "
flex.exe --nounistd --never-interactive --noline %1
@echo "<<<<<<      flex parse end           >>>>>> "


flex.bat的调用方法为: flex.bat %grammer_file_name , 第一个参数为词法描述文件名。

3. 通过以上设置后,可以将flex.bat集成于 VC, SouceInsight。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: