build_scanner_parser.bat

来自「Windows XP下的抓包程序实现」· Batch 代码 · 共 26 行

BAT
26
字号
@echo off

echo Building the libpcap parser and scanner...
del /Q /F  ..\libpcap\grammar.c > nul 2> nul
del /Q /F  ..\libpcap\tokdefs.h > nul 2> nul

bison -y -p pcap_ -d ../libpcap/GRAMMAR.Y > nul
if not %ERRORLEVEL% == 0 (
	echo failure in generating the grammar.
	goto end
	)

move y.tab.c ..\libpcap\grammar.c
move y.tab.h ..\libpcap\tokdefs.h

del /Q /F ..\libpcap\scanner.c >/nul 2>/nul
flex -Ppcap_ -t  ../libpcap/scanner.l > ../libpcap/scanner.c

if not %ERRORLEVEL% == 0 (
	echo failure in generating the scanner.
	goto end
	)

echo  --- Done!

:end

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?