1 /* Somewhat faster still: potentially match a lot of text with each rule */
9 int cc = 0, wc = 0, lc = 0;
11 {word}{ws}* cc += yyleng; ++wc;
12 {word}{ws}*\n cc += yyleng; ++wc; ++lc;
13 {words}{word}{ws}* cc += yyleng; wc += 2;
14 {words}{2}{word}{ws}* cc += yyleng; wc += 3;
15 {words}{3}{word}{ws}* cc += yyleng; wc += 4;
19 \n+ cc += yyleng; lc += yyleng;
22 printf( "%8d %8d %8d\n", lc, wc, cc );