pci: don't do sanity check for missing pci bus, the check can misfire.
[minix.git] / commands / flex-2.5.4 / MISC / fastwc / wc4.l
blobcbe56f6e16ba6150b23357aa0ab16181dcbca4f4
1 /* Fastest version of wc: add rules to pick up newlines, too */
3 ws    [ \t]
4 nonws [^ \t\n]
5 word  {ws}*{nonws}+
6 words {word}{ws}+
8 %%
9         int cc = 0, wc = 0, lc = 0;
11 {word}{ws}*             ++wc; cc += yyleng;
12 {word}{ws}*\n           ++wc; cc += yyleng; ++lc;
13 {words}{word}{ws}*      wc += 2; cc += yyleng;
14 {words}{word}{ws}*\n    wc += 2; cc += yyleng; ++lc;
15 {words}{2}{word}{ws}*   wc += 3; cc += yyleng;
16 {words}{2}{word}{ws}*\n wc += 3; cc += yyleng; ++lc;
17 {words}{3}{word}{ws}*   wc += 4; cc += yyleng;
18 {words}{3}{word}{ws}*\n wc += 4; cc += yyleng; ++lc;
20 {ws}+                   cc += yyleng;
22 \n+                     cc += yyleng; lc += yyleng;
24 <<EOF>>         {
25                 printf( "%8d %8d %8d\n", lc, wc, cc );
26                 yyterminate();
27                 }