%{
#include <stdio.h>
%}
%%
[0-9]+ { printf
("
NUMBER: %s\n", yytext); } [a-zA-Z]+ { printf("WORD: %s\n", yytext); }
[ \t\n]+ { /* Ignore whitespace */ }
. { printf("UNKNOWN: %s\n", yytext); }
%%
int main(int argc, char **argv) {
yylex();
return 0;
}
int yywrap() {
return 1;
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CiV9CgolJQpbMC05XSsgICAgICAgICAgeyBwcmludGYoIk5VTUJFUjogJXNcbiIsIHl5dGV4dCk7IH0KW2EtekEtWl0rICAgICAgIHsgcHJpbnRmKCJXT1JEOiAlc1xuIiwgeXl0ZXh0KTsgfQpbIFx0XG5dKyAgICAgICAgeyAvKiBJZ25vcmUgd2hpdGVzcGFjZSAqLyB9Ci4gICAgICAgICAgICAgICB7IHByaW50ZigiVU5LTk9XTjogJXNcbiIsIHl5dGV4dCk7IH0KJSUKCmludCBtYWluKGludCBhcmdjLCBjaGFyICoqYXJndikgewogICAgeXlsZXgoKTsKICAgIHJldHVybiAwOwp9CgppbnQgeXl3cmFwKCkgewogICAgcmV0dXJuIDE7Cn0K