%{
#include <stdio.h>
#include <string.h>
%}
%%
[0-9]+ { printf
("
Number: %s, Length: %d\n", yytext, yyleng); } [a-zA-Z]+ { printf("Word: %s, Length: %d\n", yytext, yyleng); }
[ \t\n]+ ; // Ignore whitespace characters
%%
int main() {
yylex();
return 0;
}
int yywrap() {
return 1;
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdHJpbmcuaD4KJX0KCiUlCgpbMC05XSsgICAgICAgICAgICAgICB7IHByaW50ZigiTnVtYmVyOiAlcywgTGVuZ3RoOiAlZFxuIiwgeXl0ZXh0LCB5eWxlbmcpOyB9ClthLXpBLVpdKyAgICAgICAgICAgIHsgcHJpbnRmKCJXb3JkOiAlcywgTGVuZ3RoOiAlZFxuIiwgeXl0ZXh0LCB5eWxlbmcpOyB9ClsgXHRcbl0rICAgICAgICAgICAgIDsgLy8gSWdub3JlIHdoaXRlc3BhY2UgY2hhcmFjdGVycwoKJSUKCmludCBtYWluKCkgewogICAgeXlsZXgoKTsKICAgIHJldHVybiAwOwp9CgppbnQgeXl3cmFwKCkgewogICAgcmV0dXJuIDE7Cn0K