tools/llvm: Do not build with symbols
[minix3.git] / external / bsd / flex / dist / examples / fastwc / wc1.l
blob976aa31b7bec0ba609a4266ff72e296c34603b0b
1 /*      $NetBSD: wc1.l,v 1.1.1.1 2009/10/26 00:28:34 christos Exp $     */
3 /* First cut at a flex-based "wc" tool. */
5 ws    [ \t]
6 nonws [^ \t\n]
8 %option main noyywrap
9 %%
10         int cc = 0, wc = 0, lc = 0;
12 {nonws}+        cc += yyleng; ++wc;
14 {ws}+           cc += yyleng;
16 \n              ++lc; ++cc;
18 <<EOF>>         {
19                 printf( "%8d %8d %8d\n", lc, wc, cc );
20                 yyterminate();
21                 }