Question is self explanatory
Here is the code:
%{
int i=0;
%}
%%
[a-z A-Z]+ {printf("%d:%s",i,yytext);i++;}
%%
main()
{
extern FILE *yyin;
yyin=fopen("new","r");
yylex();
}
Here is the code:
%{
int i=0;
%}
%%
[a-z A-Z]+ {printf("%d:%s",i,yytext);i++;}
%%
main()
{
extern FILE *yyin;
yyin=fopen("new","r");
yylex();
}
No comments:
Post a Comment