%{
#include<stdio.h>
#include<string.h>
int count=0,ncount=0;
%}
%%
[a-zA-Z][a-zA-Z0-9]*[+*]+ {ncount++;}
[*+]+[a-zA-Z][a-zA-Z0-9]* {ncount++;}
[a-zA-Z][a-zA-Z0-9]* {count++;}
. {;}
\n {;}
%%
int yywrap(){
return 1;}
int main(int argc,char* argv[]){
if(argc!=2){
printf("Usage: ./a.out in.txt out.txt \n");
exit(0);}
yyin=fopen(argv[1],"r");
yylex();
printf("No. of identifiers: %d\n No. of Non Variables: %d",count,ncount);
return 0;
}
JXsKI2luY2x1ZGU8c3RkaW8uaD4KI2luY2x1ZGU8c3RyaW5nLmg+CmludCBjb3VudD0wLG5jb3VudD0wOwolfQolJQpbYS16QS1aXVthLXpBLVowLTldKlsrKl0rIHtuY291bnQrKzt9ClsqK10rW2EtekEtWl1bYS16QS1aMC05XSoge25jb3VudCsrO30KW2EtekEtWl1bYS16QS1aMC05XSoge2NvdW50Kys7fQouIHs7fQpcbiB7O30KJSUKaW50IHl5d3JhcCgpewpyZXR1cm4gMTt9CmludCBtYWluKGludCBhcmdjLGNoYXIqIGFyZ3ZbXSl7CmlmKGFyZ2MhPTIpewpwcmludGYoIlVzYWdlOiAuL2Eub3V0IGluLnR4dCBvdXQudHh0IFxuIik7CmV4aXQoMCk7fQp5eWluPWZvcGVuKGFyZ3ZbMV0sInIiKTsKeXlsZXgoKTsKcHJpbnRmKCJOby4gb2YgaWRlbnRpZmllcnM6ICVkXG4gTm8uIG9mIE5vbiBWYXJpYWJsZXM6ICVkIixjb3VudCxuY291bnQpOwpyZXR1cm4gMDsKfQo=