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。
posted on 2010-08-19 21:32 NBSTAR 阅读(425) 评论(0) 编辑 收藏 举报