%{
#include <stdio.h>
%}
DIGIT [0-9]
EXPONENT [eE][+-]?{DIGIT}+
%%
{DIGIT
}+"
."
{DIGIT
}*{EXPONENT
}?
{ printf
("Floating Point
Number: %s\n", yytext); } {DIGIT
}+{EXPONENT
} { printf
("Floating Point
Number: %s\n", yytext); } {DIGIT
}+ { printf
("
Integer: %s\n", yytext); } [ \t\n] ; // Ignore whitespaces and newlines
. { printf("Invalid: %s\n", yytext); }
%%
int main() {
yylex();
return 0;
}
JXsKI2luY2x1ZGUgPHN0ZGlvLmg+CiV9CgpESUdJVCBbMC05XQpFWFBPTkVOVCBbZUVdWystXT97RElHSVR9KwoKJSUKe0RJR0lUfSsiLiJ7RElHSVR9KntFWFBPTkVOVH0/ICAgeyBwcmludGYoIkZsb2F0aW5nIFBvaW50IE51bWJlcjogJXNcbiIsIHl5dGV4dCk7IH0Ke0RJR0lUfSt7RVhQT05FTlR9ICAgICAgICAgICAgICAgeyBwcmludGYoIkZsb2F0aW5nIFBvaW50IE51bWJlcjogJXNcbiIsIHl5dGV4dCk7IH0Ke0RJR0lUfSsgICAgICAgICAgICAgICAgICAgICAgICAgeyBwcmludGYoIkludGVnZXI6ICVzXG4iLCB5eXRleHQpOyB9ClsgXHRcbl0gICAgICAgICAgICAgICAgICAgICAgICAgOyAvLyBJZ25vcmUgd2hpdGVzcGFjZXMgYW5kIG5ld2xpbmVzCi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyBwcmludGYoIkludmFsaWQ6ICVzXG4iLCB5eXRleHQpOyB9CgolJQoKaW50IG1haW4oKSB7CiAgICB5eWxleCgpOwogICAgcmV0dXJuIDA7Cn0K