408d396a9adbc3427da4465e7f85a38196691f63
[filters.git] / jethro.l
1
2 /* jethro.l */
3 %e 7000
4 %k 5000
5 %p 9000
6 %n 2000
7 %a 9000
8 %o 7000
9
10 SW [\n \"(]
11 EW [\n ".",\"!?):;]
12 BW [\n ]
13
14 %{
15 /*
16 ** jethro v. 1.00 06/10/93
17 ** Duane Paulson <ci922@cleveland.freenet.edu> "dap"
18 ** Hillbilly text filter. Compile with lex, then C.
19 ** syntax will be:
20 ** jethro <input_file >output_file.
21 ** Public domain. Use at your own risk. Y'all come back now, heah?
22 */
23 /*************************************************************************
24 REVISION LOG
25 when ver who change
26 -------- ---- --- -----------------------------------------------------
27 06/10/93 1.00 dap Initial release.
28 8.May.94 1.10 beg Fixed for HP-UX
29 *************************************************************************/
30
31 #define PUTLAST unput(*(yytext+strlen(yytext)-1));
32 #define SUB(A) fprintf(yyout, "%c%s", *A|(*yytext&32), A+1);
33 #define SSUB(A) fprintf(yyout, "%c%c%s", *yytext, *A|(*(yytext+1)&32), A+1);
34 #define SESUB(A) fprintf(yyout, "%c%c%s", *yytext, *A|(*(yytext+1)&32), A+1); PUTLAST;
35 #define ESUB(A) fprintf(yyout, "%c%s", *A|(*yytext&32), A+1); PUTLAST;
36
37 #include <string.h>
38
39 char WhAt[]="@(#)Duane Paulson's hillbilly text filter. (jethro)\n@(#)$Header: jethro.l,v 1.1 94/05/08 23:41:58 bgriffin Final $"
40 ;
41
42 %}
43
44 %%
45
46 {SW}[Gg]reetings{EW} |
47 {SW}[Hh]i{EW} |
48 {SW}[Hh]ello{EW} SESUB("Howdy");
49 {SW}[Bb]ye{EW} |
50 {SW}[Gg]oodbye{EW} SESUB("Y'all come back now, heah?");
51 {SW}[Hh]ear{EW} SESUB("Heah");
52 {SW}[Cc]ar{EW} |
53 {SW}[Aa]uto{EW} |
54 {SW}[Rr]elax{EW} SESUB("Set a spell -- put yore feet up");
55 {SW}[Aa]utomobile{EW} SESUB("Gasoline buggy");
56 [Ss]wimming{BW}pool SUB("Cement pond");
57 [Pp]ool{BW}table SUB("Fancy eatin table");
58 [Pp]ool{BW}cue |
59 [Cc]ue{BW}stick SUB("Fancy pot passer");
60 {SW}[Bb][r]?oil{EW} |
61 {SW}[Bb]ake{EW} |
62 {SW}[Ff]ry{EW} |
63 {SW}[Ss]aute{EW} |
64 {SW}[Cc]ook{EW} SESUB("Whomp up");
65 {SW}[Bb][r]?oiling{EW} |
66 {SW}[Bb]akeing{EW} |
67 {SW}[Ff]rying{EW} |
68 {SW}[Ss]auteing{EW} |
69 {SW}[Cc]ooking{EW} SESUB("Whompin up");
70 {SW}[Bb][r]?oiled{EW} |
71 {SW}[Bb]aked{EW} |
72 {SW}[Ff]ryed{EW} |
73 {SW}[Ss]auted{EW} |
74 {SW}[Cc]ooked{EW} SESUB("Done whomped up");
75 {SW}[Bb][r]?oils{EW} |
76 {SW}[Bb]akes{EW} |
77 {SW}[Ff]rys{EW} |
78 {SW}[Ss]autes{EW} |
79 {SW}[Cc]ooks{EW} SESUB("Whomps up");
80 {SW}[Gg]roceries{EW} |
81 {SW}[Ff]ood{EW} SESUB("Vittles");
82 [Ss]alad SUB("Slaw");
83 [Vv]egetable SUB("Green");
84 [Pp]otato SUB("Tater");
85 {SW}[Tt]omato SSUB("Tuhmater");
86 {SW}[Rr]hubarb{EW} SESUB("Pie plant");
87 {SW}[Ll]iquor{EW} |
88 {SW}[Ww]hisk[e]?y{EW} |
89 {SW}[Ss]cotch{EW} |
90 {SW}[Bb]ourbon{EW} |
91 {SW}[Gg]in{EW} |
92 {SW}[Vv]odka{EW} |
93 {SW}[Tt]equila{EW} |
94 {SW}[Ll]iqueur{EW} SESUB("Rheumatiz medcin");
95 {SW}[Bb]ooze{EW} SESUB("Corn likker");
96 {SW}[Cc]ocktail{EW} |
97 {SW}[Mm]ixed{BW}drink{EW} SESUB("Waste of good likker");
98 {SW}[Bb]ar{EW} SESUB("Dance hall");
99 {SW}[Bb]ars{EW} SESUB("Dance halls");
100 {SW}[Ss]aloon |
101 {SW}[Cc]ocktail{BW}lounge SESUB("Dance hall");
102 {SW}[Ww]hore |
103 {SW}[Pp]rostitute |
104 {SW}[Ss]lut SSUB("Dance hall girl");
105 {SW}[Ss]ecret{BW}agent{EW} |
106 {SW}[Ss]py{EW} |
107 {SW}007{EW} SESUB("Double nought spy");
108 {SW}[Zz]ero{EW} SESUB("Nought");
109 {SW}[Pp]ants{EW} SESUB("Trousers");
110 {SW}[Jj]eans{EW} |
111 {SW}[Dd]ungarees{EW} |
112 {SW}[Ll]evi[']?s{EW} SESUB("Overhalls");
113 {SW}[Ss]hoe SSUB("High-button shoe");
114 {SW}[Jj]acket SSUB("Coat");
115 {SW}[Ss]hotgun SSUB("Fowlin piece");
116 {SW}[Rr]evolver |
117 {SW}[Gg]un SSUB("Shootin iron");
118 {SW}[Rr]ifle SSUB("Ozark longrifle");
119 {SW}[Ll]ibrar[yi] SSUB("Liberry");
120 [Ww]ash SUB("Warsh");
121 [Ff]amily SUB("Fambly");
122 [Ff]ry{BW}pan |
123 [Ff]rying{BW}pan |
124 [Ss]aute{BW}pan SUB("Skillet");
125 {SW}[Aa]nimal SSUB("Critter");
126 {SW}FBI{EW} |
127 {SW}F.B.I.{EW} |
128 {SW}CIA{EW} |
129 {SW}C.I.A.{EW} |
130 {SW}ATF{EW} |
131 {SW}A.T.F.{EW} |
132 {SW}IRS{EW} |
133 {SW}I.R.S.{EW} |
134 {SW}SS{EW} |
135 {SW}S.S.{EW} |
136 {SW}[Ss]elective{BW}[Ss]ervice{EW} |
137 {SW}[Ss]elective{BW}[Ss]ervice{BW}[Ss]ystem{EW} |
138 {SW}[Ss]ecret{BW}[Ss]ervice{EW} SESUB("Revanooers");
139 {SW}[Pp]olice |
140 {SW}[Pp]oliceman |
141 {SW}[Ss]heriff |
142 {SW}[Dd]eputy |
143 {SW}[Dd]eputy{BW}[Ss]heriff |
144 {SW}[Mm]arshall |
145 {SW}[Dd]eputy{BW}[Mm]arshall |
146 {SW}[Pp]ark{BW}[Rr]anger |
147 {SW}[Tt]exas{BW}[Rr]anger |
148 {SW}[Hh]ighway{BW}[Pp]atrol SSUB("Constable");
149
150 {SW}[Mm]other |
151 {SW}[Mm][ao]mm[ay]? |
152 {SW}[Mm]ommie |
153 {SW}[Mm]om SSUB("Maw");
154 {SW}[Mm]a{EW} SESUB("Maw");
155 {SW}[Ff]ather SSUB("Paw");
156 {SW}[Dd]ad{EW} |
157 {SW}[Dd]addy |
158 {SW}[Pp]a{EW} |
159 {SW}[Pp][ao]p{EW} |
160 {SW}[Pp][ao]pp[ay]?{EW} SESUB("Paw");
161 {SW}[Gg]randmother{EW} |
162 {SW}[Gg]randma[w]?{EW} SESUB("Granny");
163 {SW}[Gg]randfather{EW} |
164 {SW}[Gg]ran[d]{1,2}ad[d]?[y]?{EW} |
165 {SW}[Gg]randpop{EW} |
166 {SW}[Gg]randpa[w]?{EW} SESUB("Grampy");
167 {SW}[Mm]y{EW} SESUB("Mah");
168 {SW}them{EW} SESUB("em");
169 [Dd]og SUB("Dawg");
170 [Ll]awyer |
171 [Ll]egal{BW}counc[ei]l |
172 [Ll]egal{BW}councellor |
173 [Aa]ttorney |
174 [Aa]ttorney{BW}[Aa]t{BW}[Ll]aw SUB("City slicker");
175
176 {SW}[Tt]han{EW} SESUB("Then");
177 [Cc]haracterize SUB("Show");
178 {SW}[Vv]ery{EW} |
179 {SW}[Ee]xtremely{EW} |
180 {SW}[Rr]eally{EW} |
181 {SW}[Rr]eal{EW} SESUB("Right");
182 {SW}[Hh]aven't{EW} |
183 {SW}[Ii]sn't{EW} |
184 {SW}[Aa]ren't{EW} SESUB("Aint");
185 {SW}[Ss]aid{EW} |
186 {SW}[Ss]ays{EW} SESUB("Sez");
187 {SW}[Aa]re{EW} SESUB("Is");
188 {SW}[Ss]hould{EW} SESUB("Ortta");
189 {SW}[Pp]erhaps{EW} |
190 {SW}[Mm]aybe{EW} SESUB("Mebbe");
191 {SW}[Ss]ick{EW} SESUB("Ailin'");
192 {SW}I'm{BW}not{EW} SESUB("I aint");
193 {SW}[Ss]cared{EW} SESUB("A-skeert");
194 {SW}[Ss]care SSUB("Skeer");
195 {SW}[Hh]ave{EW} SESUB("Got");
196 {SW}[Pp]ossess{EW} SESUB("Have");
197 {SW}[Hh]elp SSUB("Hep");
198 {SW}[Tt]ired{EW} SESUB("Tuckered out");
199 {SW}[Cc]ompletely{EW} SESUB("Plumb");
200 {SW}[Dd]runk{EW} SESUB("A mite woozy");
201
202 {SW}[Yy]es{EW} SESUB("Yep");
203 {SW}[Nn]o{EW} SESUB("Nope");
204
205 {SW}[Ii]t{BW}is{EW} SESUB("Tis");
206 {SW}[Aa]t{BW}all{EW} *(yytext+1)=(char)'A'; SESUB("A tall");
207
208 {SW}[Aa]m{EW} |
209 {SW}[Ww]as{EW} |
210 {SW}[Ww]ere{EW} SESUB("Wuz");
211 {SW}[Ww]asn't{EW} SESUB("Wasunt");
212 [Ee]very SUB("Ever");
213 {SW}[Ww]ant/s SSUB("Is after");
214 {SW}[Ww]anted{EW} SESUB("Was after");
215 {SW}[Ww]anting{EW} SESUB("Hankering after");
216 {SW}[Dd]oesn't{EW} |
217 {SW}[Dd]on't{EW} SESUB("Dasent");
218 {SW}[Yy]ou'll{EW} SESUB("Y'all will");
219 {SW}[Yy]our SSUB("Yore");
220 {SW}[Mm]ore{EW} SESUB("Mo");
221 tial SUB("shul");
222 cious SUB("shus");
223 ious SUB("yus");
224 tion SUB("shun");
225 {SW}[Cc]an{EW} SESUB("C'n");
226 {SW}[Yy]ou{EW} SESUB("Y'all");
227 {SW}[Ff]or{EW} SESUB("Fer");
228 {SW}[Tt]he{EW} SESUB("Duh");
229 ing SUB("in");
230 {SW}[Tt]oo{EW} SESUB("Besides");
231 {SW}[Tt]o{EW} SESUB("Tuh");
232 {SW}[Aa][n]?{EW} SESUB("Ah");
233 {SW}[Oo]ur{EW} |
234 {SW}[Oo]r{EW} SESUB("Ore");
235 {SW}[Oo]f{EW} SESUB("Uv");
236 {SW}I{EW} SESUB("Ah");
237 {SW}I'm{EW} SESUB("Ahm a");
238 {SW}I'll{EW} SESUB("Ahl");
239 {SW}I'd{EW} SESUB("Ah wood");
240 'nt *(yytext)=(char)'u'; SUB("unt");
241 're SUB(" is");
242 've SUB(" done");
243 eed{EW} ECHO;
244 ed{EW} ESUB("d");
245 {SW}[Oo]wn{EW} |
246 {SW}[Tt]own{EW} |
247 {SW}[Dd]own{EW} |
248 {SW}[Gg]own{EW} |
249 {SW}[Bb]rown{EW} ECHO;
250 wn{EW} ESUB("ed");
251 {SW}[Bb]elow{EW} |
252 {SW}[Kk]now{EW} |
253 {SW}[Tt]hrow{EW} |
254 {SW}[Gg]row{EW} |
255 {SW}[Hh]ow{EW} |
256 {SW}[Nn]ow{EW} |
257 {SW}[Bb]row{EW} |
258 {SW}[Ss]how{EW} ECHO;
259 ow{EW} ESUB("er");
260 re{EW} |
261 er{EW} ESUB("uh");
262 {SW}[Hh]er{EW} ECHO;
263 ! SUB(". Ye DAWGies!!!");
264
265 %%
This page took 0.028465 seconds and 3 git commands to generate.