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