digit [0-9]*
string [a-zA-Z]*
END !
%%
{digit} printf("Digit: %s",yytext);
{string} printf("string: %s",yytext);
{END} {
printf("program ended");
return 0;
}
%%
int main()
{yylex();
}
int yywrap()
{
return 1;
}
ZGlnaXQgWzAtOV0qCgpzdHJpbmcgW2EtekEtWl0qCgpFTkQgIQoKJSUKCntkaWdpdH0gcHJpbnRmKCJEaWdpdDogJXMiLHl5dGV4dCk7Cgp7c3RyaW5nfSBwcmludGYoInN0cmluZzogJXMiLHl5dGV4dCk7Cgp7RU5EfSB7CgpwcmludGYoInByb2dyYW0gZW5kZWQiKTsKCnJldHVybiAwOwoKfQoKJSUKCmludCBtYWluKCkKCnt5eWxleCgpOwoKfQoKaW50IHl5d3JhcCgpCgp7CgpyZXR1cm4gMTsKCn0K