Providing JSP, Servlet, JAVA, JavaScript, HTML, CSS, C#, C++, Python Tutorials
%{ int c=0; %} str [1]* %% {str} c++; %% void main() { int b; printf("Enter a binary number \n"); yylex(); printf("value %d",c); b=c%2; if(b==0) printf(" accepted \n"); else printf(" rejected \n"); }
lex even.l cc lex.yy.c -lfl ./a.out
0 Comments:
Post a Comment