Monday 30 September 2013

Count the number of digits [ lex program part 4 ]


      
%{

int a=0;

%}

digit[0-9]

%%

{digit} a++;

%%

main()

{

printf("enter string");

yylex();

printf("\n no of digits %d",a);

}
    


lex part 5

0 Comments:

Post a Comment

Facebook Twitter Delicious Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | coupon codes