Sunday, 16 June 2019

Write a Lex program to printout all HTML tags in file.




Code:
%{
%}
%%
[\<].*[\>] {fprintf(yyout,"Valid HTML tag: %s",yytext);};
%%
main()
{
yyin=fopen("input.txt","r");
yyout=fopen("output.txt","w");
yylex();
return 0;
}
int yywrap()
{
return 1;
}

No comments:

Post a Comment

It's time To increase blogging capability. To have a chance to contribute in digital world. Any Interested People who want to make t...