Initial revision
[filters.git] / moo.l
CommitLineData
7e3afbba 1%e 2000
2%p 5000
3%n 1000
4%k 500
5%a 4000
6%o 2000
7BW [ ]
8EW [ .,;!?]
9
10%{
11/*
12** The cow filter
13** by Benjamin Elijah Griffin 8 May 1994
14**
15** An experiment in lex written instead of a paper on Nietzsche.
16**
17** compile like this:
18** lex moo.l
19** cc -o moo lex.yy.c -ll
20** rm lex.yy.c
21**
22** use like this:
23** moo < infile > outfile
24** or
25** cat infile | <whatever> | moo | <whatever> > outfile
26**
27*/
28
29char WhAt[]="@(#)Benjamin Elijah Griffin's moo filter for cowtalk (c) 1994\n@(#)$Header: moo.l,v 1.1 94/05/08 23:37:53 bgriffin Final $"
30;
31
32%}
33
34%%
35
36" and " printf(" moond ");
37[Uu][Nn][Ii][Xx] printf("Moonix");
38[Mm][Ss].[Dd][Oo][Ss] printf("Moo Dos");
39news printf("moos");
40[Uu]senet printf("Moosnet");
41" man " printf(" mooster ");
42" men " printf(" moosters ");
43woman printf("moostress");
44women printf("moostresses");
45pig printf("cop");
46[Dd]airy.[Ff]armer printf("Pimp");
47[Dd]airy.[Ff]arm printf("Farm of Ill Repute");
48[Bb]eef.[Ff]armer printf("Slave Driver");
49[Bb]eef.[Ff]arm printf("Prison");
50yogurt printf("bacteria culture");
51cheese printf("smega");
52curds printf("moist smega");
53whey printf("bile");
54buttermilk printf("foul fluid");
55butter { printf("sphinter lubrication");
56 /* A _Last Tango in Paris_ joke */ }
57cream printf("honey");
58beef printf("murdered meat");
59grass printf("gourmet greenry");
60hay printf("subsistance rations");
61cereal printf("fomood");
62milkmaid printf("rapist");
63[Mm]aid.a.milkin |
64[Mm]aid.a.milking printf("Christmas Rapist");
65[Mm]aids.a.milkin |
66[Mm]aids.a.milking printf("Christmas Rapists");
67milking printf("rape");
68rape printf("milking");
69rapist printf("milkmaid");
70veal printf("the devil's food");
71"bull fighter" printf("Grim Reaper");
72"bull fight" printf("Game of Sorrows");
73milk printf("mead");
74Milk printf("Mead");
75"cafe con latte" |
76capuccino printf("piss water");
77" "[In]"ndia " printf("Heaven");
78" "[In]"ndian " printf("heavenly");
79"sacred cow" printf("God");
80silo printf("calfeteria");
81divin printf("bovin");
82[Gg][Oo-][Dd] printf("Bovinity");
83sheep printf("dog(s)");
84relaxing printf("chewing the cud");
85relax printf("chew the cud");
86utter printf("udder");
87" udder" printf(" teat");
88" teat" printf(" udder");
89other printf("udder");
90":^)" printf("Mooooooooo!");
91":-)" printf("Moomoomoomoo!");
92"8-)" printf("Mooo! Mooo!");
93
94[aeiou]"." { *(yytext+1) = 0;
95 printf("%s. Moo.",yytext);
96 }
97[rtpwy]"." { *(yytext+1) = 0;
98 printf("%s. Moo! Moo.",yytext);
99 }
100"?" printf("? Moo.");
101"!" printf("! MOO!");
102oo printf("MOO");
103o printf("oo");
104O printf("Moo");
105you printf("moo");
106" u" printf("moo");
107" U" printf("Moo");
108"uu" printf("MOOO");
109u printf("oo");
110U printf("Oo");
111
112"."\n printf(".\nMooooo. ");
113
114. printf("%s",yytext);
115
116%%
117
118main()
119{
120 yylex();
121}
122
This page took 0.016917 seconds and 4 git commands to generate.