/* Lex program to check whether input is digit or not. */
%{
#include<stdio.h>
#include<stdlib.h>
%}
/* Rule Section */
%%
^[0-9]* printf("digit");
^[^0-9]|[0-9]*[a-zA-Z] printf("not a digit");
. ;
%%
int main()
{
// The function that starts the analysis
yylex();
return 0;
}
LyogTGV4IHByb2dyYW0gdG8gY2hlY2sgd2hldGhlciBpbnB1dCBpcyBkaWdpdCBvciBub3QuICovCiV7CiNpbmNsdWRlPHN0ZGlvLmg+CiNpbmNsdWRlPHN0ZGxpYi5oPgolfQovKiBSdWxlIFNlY3Rpb24gKi8KJSUKXlswLTldKiBwcmludGYoImRpZ2l0Iik7Cl5bXjAtOV18WzAtOV0qW2EtekEtWl0gcHJpbnRmKCJub3QgYSBkaWdpdCIpOwouIDsKJSUKaW50IG1haW4oKQp7CgkJLy8gVGhlIGZ1bmN0aW9uIHRoYXQgc3RhcnRzIHRoZSBhbmFseXNpcwoJeXlsZXgoKTsKCQlyZXR1cm4gMDsKfQo=