%{
#include<stdio.h>
%}
%%
[0-9] { printf("digit\n"); }
[a-zA-Z] { printf("character\n"); }
. { /* do nothing */ }
%%
int main() {
yylex(); // Start lexical analysis
return 0;
}
int yywrap() {
return 1; // Indicates end of file
}
JXsKI2luY2x1ZGU8c3RkaW8uaD4KJX0KCiUlClswLTldICAgICAgICB7IHByaW50ZigiZGlnaXRcbiIpOyB9ClthLXpBLVpdICAgICB7IHByaW50ZigiY2hhcmFjdGVyXG4iKTsgfQouICAgICAgICAgICAgeyAvKiBkbyBub3RoaW5nICovIH0KJSUKCmludCBtYWluKCkgewogICAgeXlsZXgoKTsgLy8gU3RhcnQgbGV4aWNhbCBhbmFseXNpcwogICAgcmV0dXJuIDA7Cn0KCmludCB5eXdyYXAoKSB7CiAgICByZXR1cm4gMTsgLy8gSW5kaWNhdGVzIGVuZCBvZiBmaWxlCn0K