%{
#include <stdio.h>
#include <stdlib.h>
%}
%%
[a-zA-Z_][a-zA-Z0-9_]* { printf("IDENTIFIER: %s\n", yytext); }
[0-9]+ { printf
("
NUMBER: %s\n", yytext); } [+\-*/=] { printf("OPERATOR: %s\n", yytext); }
[ \t\n]+ ; /* Ignore whitespace */
. { printf("UNKNOWN: %s\n", yytext); }
%%
int main() {
yylex();
return 0;
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KJX0KCiUlClthLXpBLVpfXVthLXpBLVowLTlfXSogICAgeyBwcmludGYoIklERU5USUZJRVI6ICVzXG4iLCB5eXRleHQpOyB9ClswLTldKyAgICAgICAgICAgICAgICAgICAgeyBwcmludGYoIk5VTUJFUjogJXNcbiIsIHl5dGV4dCk7IH0KWytcLSovPV0gICAgICAgICAgICAgICAgICB7IHByaW50ZigiT1BFUkFUT1I6ICVzXG4iLCB5eXRleHQpOyB9ClsgXHRcbl0rICAgICAgICAgICAgICAgICAgOyAgLyogSWdub3JlIHdoaXRlc3BhY2UgKi8KLiAgICAgICAgICAgICAgICAgICAgICAgICB7IHByaW50ZigiVU5LTk9XTjogJXNcbiIsIHl5dGV4dCk7IH0KJSUKCmludCBtYWluKCkgewogICAgeXlsZXgoKTsKICAgIHJldHVybiAwOwp9Cg==