11 ** The buckwheat filter
12 ** by Benjamin Elijah Griffin 29 March 1995
14 ** A lex utility written as a favor for a friend. (He provided the
15 ** rules, I showed him how to make a lex filter out of them.)
19 ** cc -o buck lex.yy.c -ll
23 ** buck < infile > outfile
25 ** cat infile | <whatever> | buck | <whatever> > outfile
29 char WhAt[]="@(#)Benjamin Elijah Griffin's buck filter for buckwheat (c) 1995\n@(#)$Header:$"
40 ing[ .,;!?] printf("in'%s",yytext+3);
41 " for " printf(" po' ");
42 " in " printf(" bin ");
49 ll { printf("ww"); /* hmm, do we really want that? */ }
50 l { 1+1; /* cutesy null statement */ }
55 " r"[aeiou] printf("%s",yytext+2);
56 R[aeiou] printf("R%s",toupper(*(yytext+1)));
57 r[^ .,;!?] printf("%s",yytext+1);
63 n[a-z][ .,;!?] printf("n%s",yytext+2);
68 " "s[aeiou] printf(" t%s",yytext+2);
69 S[aeiou] printf("T%s",yytext+1);
70 " "s[qwrtypsdfghjklzxcvbnm] printf(" %s",yytext+2);
71 S[qwrtypsdfghjklzxcvbnm] printf("%s",yytext+1);
72 " "c[aou] printf(" %s",yytext+2);
73 C[aou] printf("C%c",toupper(*(yytext+1)));
74 " "r[aeiou] printf(" %s",yytext+2);
75 R[aeiou] printf("R%c",toupper(*(yytext+1)));
77 . printf("%s",yytext);