How to run lex file?
问题 Here is my lex file %% .|\n ECHO; %% How to run this program in windows? How to compile this? Please help me 回答1: Use this procedure to compile: How to compile LEX/YACC files on Windows? Basically: flex olex.l gcc lex.yy.c -o olex.exe And this modified file: %% .|"\n" { ECHO; } %% int yywrap(void) { return 0; } int main(void) { yylex(); return 0; } I hope this works for you. 来源: https://stackoverflow.com/questions/8373821/how-to-run-lex-file