前言:环境自己查找资料
第一次写文章awa
先上代码:
%{
#include<stdio.h> // 和C一样定义了头文件
%}
%%
stop printf("input stop"); //输入stop输出input stop
start printf("input start");
%%
int main(int argc, char**argv){ //主函数
yylex();
}
本人是windows 10
编译文件 flex xxx.l
gcc lex.yy.c