Well topic speak for himself, here example of a code(lex file before compilation):
%{
#include<stdio.h>
int Upperc=0;
int Lowerc=0;
%}
%%
[A-Z] {printf("Upperccase\t");Upperc++;}
[a-z] {printf("Lowerccase\t");Lowerc++;}
%%
main()
{
printf("Enter a string\n");
yylex();
printf("Upperccase=%d and Lowerccase=%d",Upperc,Lowerc);
}
for some reason when trying to run at vs13, I'm always getting syntax error: 'constant'
, there is no line or any information about there error except this,
please help me understand what is wrong, thanks!