%{
#include <stdio.h>
%}
%%
<[^>]+> { printf("%s\n", yytext); }
.|
\n { /* Ignore other characters */ }
%%
int main(int argc, char **argv) {
if (argc > 1) {
FILE *file = fopen(argv[1], "r");
if (!file) {
perror("Error opening file");
return 1;
}
yyin = file;
}
yylex();
return 0;
}
int yywrap() {
return 1;
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CiV9CgolJQoKPFtePl0rPiB7IHByaW50ZigiJXNcbiIsIHl5dGV4dCk7IH0KCi58ClxuIHsgLyogSWdub3JlIG90aGVyIGNoYXJhY3RlcnMgKi8gfQoKJSUKCmludCBtYWluKGludCBhcmdjLCBjaGFyICoqYXJndikgewogICAgaWYgKGFyZ2MgPiAxKSB7CiAgICAgICAgRklMRSAqZmlsZSA9IGZvcGVuKGFyZ3ZbMV0sICJyIik7CiAgICAgICAgaWYgKCFmaWxlKSB7CiAgICAgICAgICAgIHBlcnJvcigiRXJyb3Igb3BlbmluZyBmaWxlIik7CiAgICAgICAgICAgIHJldHVybiAxOwogICAgICAgIH0KICAgICAgICB5eWluID0gZmlsZTsKICAgIH0KICAgIHl5bGV4KCk7CiAgICByZXR1cm4gMDsKfQoKaW50IHl5d3JhcCgpIHsKICAgIHJldHVybiAxOwp9Cg==