私は、次のコードを持っており、それは誤り「を 『hello.l』を与え、ライン31:時期尚早EOF」私は、次のコマンドを実行します フレックスhello.l時期尚早EOFエラー
%{
#include <stdlib.h>
#include "y.tab.h"
%}
%%
("hi"|"oi")"\n" {return HI; }
("tchau"|"bye")"\n" {return BYE;}
. {yyerror(); }
%%
int main(void)
{
yyparse();
return 0;
}
int yywrap(void)
{
return 0;
}
int yyerror(void)
{
printf("Error\n");
exit(1);
}
あなたはどのようにコンパイルの両方lex.yy.を実行する方法を教えてもらえますdev-C++のcとy.tab.cファイル – Waseem