1 /* Somewhat faster "wc" tool: match more 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;
16 \n+ cc += yyleng; lc += yyleng;
19 printf( "%8d %8d %8d\n", lc, wc, cc );