]> iEval git - filters.git/commitdiff
* cockney, jive, and nyc filters are now GPL'd, moved from -nonfree
authorjoey <joey@a4a2c43b-8ac3-0310-8836-e0e880c912e2>
Thu, 23 Nov 2000 03:26:29 +0000 (03:26 +0000)
committerjoey <joey@a4a2c43b-8ac3-0310-8836-e0e880c912e2>
Thu, 23 Nov 2000 03:26:29 +0000 (03:26 +0000)
     package.

Makefile
cockney.l [new file with mode: 0644]
debian/changelog
debian/control
debian/copyright
filters.6
jibberish
jive.l [new file with mode: 0644]
nyc.l [new file with mode: 0644]

index 8ecd83304d00d43776e5b7e64ff29b3534b86df8..88a38bbccdb899515441d6750e77b61c77e65ca6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
 
 LEX     = flex
 
-ALL     = jethro kraut
+ALL     = jethro kraut cockney jive nyc
 OTHER   = eleet b1ff chef jibberish upside-down
 
 all:   $(OTHER) $(ALL)
diff --git a/cockney.l b/cockney.l
new file mode 100644 (file)
index 0000000..e6c0bda
--- /dev/null
+++ b/cockney.l
@@ -0,0 +1,190 @@
+%{
+/*
+ *     Lex filter to transform plain English into Cockney English.
+ *     No racial or societal slurs are intended.  For amusement only.
+ *
+ *     Copyright 1986 by Daniel Klein.
+ *
+ *     Reproduction permitted so long as this notice is retained.
+ */
+%}
+
+BW [ \t\n]
+SP [ \t]+
+EW [ \t.,;!\?$]
+
+%Start junk
+
+%%
+<junk>.                        {       srandom(time(0L)); unput(yytext[0]); BEGIN 0; }
+{BW}[Tt]he{EW}         {       ECHO; bloody(); }
+{BW}[Ss]teal{EW}       {       printf("%c%cick",yytext[0],yytext[1]-5);
+                               eos();
+                       }
+{BW}[Ss]tole{EW}       {       printf("%c%cicked",yytext[0],yytext[1]-5);
+                               eos();
+                       }
+{BW}tired                      pooped();
+{BW}were{EW}           |
+{BW}was{EW}            {       printf("%cwuz",yytext[0]); eos(); }
+[Hh]ello                       printf("'%cllo", caseify('u'));
+{BW}[Hh]                       printf("%c'",yytext[0]);
+{BW}[Yy]our{EW}                {       printf("%.2ser",yytext); eos(); }
+{BW}it{EW}             {       printf("%.2s'",yytext); eos(); }
+{BW}go{EW}             {       printf("%.2sow",yytext); eos(); }
+{BW}and{EW}            {       printf("%c'n'",yytext[0]); eos(); }
+{BW}my{EW}             {       printf("%.2se",yytext); eos(); }
+{BW}th(is|at){EW}      {       printf("%.5s", yytext); eos(); }
+{BW}[Ww]e{SP}went{EW}  |
+{BW}[Ww]e{SP}had{EW}   |
+{BW}[Ww]e{SP}did{EW}   {       printf("%.*s",yyleng-1,yytext);
+                               set_did(2);
+                               eos();
+                       }
+{BW}I{SP}went{EW}      |
+{BW}I{SP}had{EW}       |
+{BW}I{SP}did{EW}       {       I();
+                               printf(" did");
+                               set_did(1);
+                               eos();
+                       }
+{BW}I{EW}              {       I(); eos(); }
+
+[Yy]ou{SP}[^aeiouy]    {       printf("%c'", yytext[0]); plastc(); }
+[Ww]hat{SP}are{EW}     {       printf("%cotta", yytext[0]); eos(); }
+
+{BW}other              |
+[MmNnRr]other                  printf("%cuvver",yytext[0]);
+[MmSs]outh                     printf("%cowf", yytext[0]);
+[cYy]outh                      printf("%coof", yytext[0]);
+[^o]uth                                printf("%.2sf",yytext);
+{BW}th[^e]             |
+[AaEeIiOo]th[^em]      {       printf("%cf",yytext[0]); plastc(); }
+oothe                  |
+e[ei]the               {       printf("%c%cve", yytext[0], yytext[0]); }
+ooth                   |
+eeth                   {       printf("%c%cf", yytext[0], yytext[0]); }
+[aei]the               {       printf("%cvv",yytext[0]); plastc(); }
+th                             putchar('v');
+a[km]e{EW}             {       printf("i%ce",yytext[1]); eos(); }
+[^r][Oo]ld                     printf("%.2swld",yytext);
+[^AaEeIiOoUu][uo]nd[a-z]       printf("%cunn%c",yytext[0],yytext[yyleng-1]);
+ing{EW}                        {       printf("in'"); eos(); }
+[^dg]get+[^h]                  printf("%cge'%c",yytext[0],yytext[yyleng-1]);
+ail                            printf("aiw");
+any                            printf("enny");
+[rSs]ay{EW}            {       printf("%cigh",yytext[0]); eos(); }
+way                            printf("why");
+[BbHh]it{EW}           {       printf("%ci'",yytext[0]); eos(); }
+ait{EW}                        {       printf("ite"); eos(); }
+ime{EW}                        {       printf("oime"); eos(); }
+[^e]ize[^n]                    printf("%coize%c",yytext[0],yytext[yyleng-1]);
+[^e]ight                       printf("%coit",*yytext);
+[a-z]"?"               {       *(yytext+1) = ',';
+                               printf("%s roit?",yytext);
+                               clear_did();
+                       }
+[a-z]"."               {       printf("%c", yytext[0]); dintI(); }
+\n                             printf("\n");
+
+%%
+
+eos()
+{
+    if (yytext[yyleng-1] == '.')
+       dintI();
+    else
+       unput(yytext[yyleng-1]);
+}
+
+plastc()
+{
+    unput(yytext[yyleng-1]);
+}
+
+caseify(c)
+char c;
+{
+    if (yytext[0] <= 'Z')
+       return (c - ' ');
+    else
+       return (c);
+}
+
+
+I()
+{
+/*    extern long random(); */
+
+    if (random() % 100 < 20)
+       printf("%cOy",yytext[0]);
+    else
+       printf("%cI",yytext[0]);
+}
+
+static short b_count = 0;
+static short b_which = 0;
+
+bloody()
+{
+       if (b_count++ % 2 == 0) {
+               switch (b_which++ % 4) {
+                       case 0: printf("bloody "); break;
+                       case 1: printf("flinkin' "); break;
+                       case 2: printf("bleedin' "); break;
+                       case 3: printf("soddin' "); break;
+                       }
+               }
+}
+
+static short did = 0;
+
+set_did(val)
+{
+    did = val;
+}
+
+clear_did()
+{
+    did = 0;
+}
+
+dintI()
+{
+/*    extern long random(); */
+
+    if ((did == 1) && (random() % 100 < 50))
+       printf(", didn'I?");
+    else if ((did == 2) && (random() % 100 < 50))
+       printf(", din't we?");
+    else
+       printf(".");
+    clear_did();
+}
+
+pooped()
+{
+/*    extern long random(); */
+
+    switch (random() % 3) {
+       case 0:
+           printf("%cknackered", yytext[0]);
+           break;
+       case 1:
+           printf("%cshagged out", yytext[0]);
+           break;
+       case 2:
+           printf("%cdone in", yytext[0]);
+           break;
+       }
+}
+
+expletive()
+{
+/*
+Blimey
+Stright a light
+'Strewth
+Cor blimey
+*/
+}
index 154e8c42543da9ce1aafadf0096f53629f61bd26..07823de05699ad58f0936f138efca5274c0bffbb 100644 (file)
@@ -1,3 +1,10 @@
+filters (2.13) unstable; urgency=low
+
+  * cockney, jive, and nyc filters are now GPL'd, moved from -nonfree
+    package.
+
+ -- Joey Hess <joeyh@debian.org>  Wed, 22 Nov 2000 19:04:08 -0800
+
 filters (2.12) unstable; urgency=low
 
   * Use debhelper v2.
index e8e411872cfd32226c1b2163abee8d88b5d60832..6e02ba4921212fb2bd9c2bad4b248bc39e8d8e60 100644 (file)
@@ -7,6 +7,7 @@ Standards-Version: 3.2.1.0
 
 Package: filters
 Architecture: any
+Conflicts: filters-nonfree (<< 2.4)
 Depends: ${shlibs:Depends}
 Description: a collection of filters, including B1FF and the swedish chef
  A collection of filters to do all sorts of strange things to text.
index 0a7ccdeee0dbdea15176bb8e1433d657ab30afbf..ed43db7391627ad7bf259ddaa880a7df3b450276 100644 (file)
@@ -6,14 +6,31 @@ This package was put together and debianized by Joey Hess
        ftp://ftp.funet.fi/pub/misc/old-hsu-archive/unsorted/2/kraut.shar.gz
 
 The jethro filter has this copyright:
- **   Public domain. Use at your own risk. Y'all come back now, heah?
 **   Public domain. Use at your own risk. Y'all come back now, heah?
 
 The kraut filter has this copyright:
-/* Kraut v0.9  */
-/*     by      */
-/* John Sparks */
-/*  5-5-1989   */
+  /* Kraut v0.9  */
+  /*     by      */
+  /* John Sparks */
+  /*  5-5-1989   */
 
-/* This is in the public domain. Do with it as you will. *\
+  /* This is in the public domain. Do with it as you will. *\
+
+The cockney, jive, and nyc filters are copyright under the GPL by Daniel V
+Klein. He confirmed the new copyright in this email:
+
+  From: Daniel V Klein <dvk@lonewolf.com>
+  Date: Wed, 22 Nov 2000 22:00:50 -0500
+  To: Joey Hess <joey@kitenet.net>
+  Subject: Re: filters GPL'd 
+  
+  That is so.  Have fun (FWIW, I have done some rewriting on them - they are
+  now in Perl, but still need some work...)
+  
+  -Dan
+  
+  > I've been told that you have changed the copyright of the cockney, jive
+  > and nyc filters to the GPL? Is that correct? I'd love to move them into
+  > Debian proper.
 
 Everything else is copyright 1999 by Joey Hess, under the terms of GPL.
index 105bc7a72c5a970380b6f6679c61d60b9dcb7826..fcb8211486da5c7512a2b6816970a86b211c19db 100644 (file)
--- a/filters.6
+++ b/filters.6
@@ -1,32 +1,40 @@
 .TH FILTERS 6
 .SH NAME
-b1ff, eleet, chef, jethro, jibberish, kraut, upside-down \- assorted text filters
+b1ff, chef, cockney, eleet, jethro, jibberish, jive, kraut, nyc, upside-down \- assorted text filters
 .SH SYNOPSIS
  $SHELL | chef
 .SH "DESCRIPTION"
 All of these programs are filters to do all sorts of strange things to text.
 No racial or societal slurs are intended. For amusement only.
 .P
-All the filters read input from stdin, change it, and write the filtered      
+All the filters read input from stdin, change it, and write the filtered
 text to stdout.
 .IP b1ff
 The B1FF filter
+.IP cockney
+Cockney English
 .IP chef
 convert English on stdin to Mock Swedish on stdout
 .IP jethro
 Hillbilly text filter
+.IP jive
+Jive English
 .IP jibberish
 Runs text through all the rest of the filters, to make really weird output.
 .IP eleet
 K3wl hacker slang
 .IP kraut
 Generates text with a German accent.
+.IP nyc
+Brooklyn English
 .IP upside-down
 Flips text upside down. Stand on your head and squint to read the output.
 .SH "SEE ALSO"
 .IP /usr/share/doc/filters/SAMPLES
 Lists samples of the output of all the filters.
 .SH AUTHOR
-The filters were written by Joey Hess <joey@kitenet.net>, except jibberish,
-which is by Raul Miller <rdm@test.legislate.com>, hethro, which is by Duane
-Paulson <ci922@cleveland.freenet.edu>, and kraut, by John Sparks.
+The eleet, upside-down, chef, and b1ff filters were written by Joey
+Hess <joey@kitenet.net>. Daniel V Klein <dvk@lonewolf.com> wrote the
+cockney, jive, and nyc filters. jibberish is by Raul Miller
+<rdm@test.legislate.com>, jethro is by Duane Paulson
+<ci922@cleveland.freenet.edu>, and kraut is authored by John Sparks.
index ad2743a25a57d4047fb7a58ca47faaec16e25879..5e9590cf9efc1529d79b7db818d3c75e399a7906 100644 (file)
--- a/jibberish
+++ b/jibberish
@@ -4,29 +4,29 @@
 $ENV{PATH}.=":/usr/games";
 
 @all= qw(
+eleet
+b1ff
+chef
+jethro
+upside-down
+kraut
+cockney
 jive
-valspeak
 nyc
-cockney
-fin
-biffa
-ken
-aust
-drawl
-kraut
+);
+
+@nonfree= qw(
+kyoote
 newspeak
-chef
-marc-barrett
-censor
-fudd
-moo
-buck
-jethro
-b1ff
-eleet
-ky00te
 );
 
+# Test to see if non-free filters are here, if so, add them to @all.
+foreach (@nonfree) {
+       if (-x "/usr/games/$_") {
+               push @all, $_;
+       }
+}
+
 # shuffle order
 srand;
 for (0..$#all) {
diff --git a/jive.l b/jive.l
new file mode 100644 (file)
index 0000000..dcb9924
--- /dev/null
+++ b/jive.l
@@ -0,0 +1,250 @@
+%{
+/*
+ *     Lex filter to transform plain English into Jive English.
+ *     No racial or societal slurs are intended.  For amusement only.
+ *
+ *     Copyright 1986 by Daniel Klein and Clement Cole.
+ *
+ *     Reproduction permitted so long as this notice is retained.
+ */
+%}
+%e 1700
+%p 4000
+%n 700
+%k 450
+%a 1700
+%o 1500
+BW [ \t\(]
+EW [ \t.,;!\?$\)]
+%%
+@[Bb]egin(.*)          |
+".so ".*$                      printf("%s", yytext);
+{BW}send                       printf("%ct'row",yytext[0]);
+program+                       printf("honky code");
+[Uu]nix                                printf("slow mo-fo");
+UNIX                           printf("dat slow mo-fo");
+actual                         printf("ak'shul");
+{BW}take                       printf("%csnatch",yytext[0]);
+{BW}took               |
+{BW}take[ns]                   printf("%csnatch'd",yytext[0]);
+[Mm]exican                     printf("%cet-back", caseify('w'));
+[Ii]talian                     printf("%creaser", caseify('g'));
+{BW}big{EW}            {       printf("%cbig ass",yytext[0]);plastc();}
+fool                           printf("honkyfool");
+modem                          printf("doodad");
+{BW}he{EW}             {       printf("%cmah' man he",yytext[0]);plastc();}
+"e the"{EW}            |
+"a the"{EW}            |
+"t the"{EW}            |
+"d the"{EW}            {       printf("%c da damn", yytext[0]);plastc();}
+wife                   |
+woman                          printf("mama");
+girl                           printf("goat");
+something                      printf("sump'n");
+{BW}lie                                printf("%chonky jive",yytext[0]);
+-o-                            printf("-on rebound-");
+[a-z]"."               {       printf("%s", yytext);expletive();}
+!                              printf(".  Right On!");
+[Ss]ure                                printf("%cho'", yytext[0]);
+get                            printf("git");
+"will have"{EW}                |
+"will"{EW}             |
+"got to"{EW}           {       printf("gots'ta");plastc();}
+"I am"                         printf("I's gots'ta be");
+"aren't"               |
+"am not"               |
+"have not"             |
+"is not"               |
+"are not"                      printf("ain't");
+{BW}see{EW}            {       printf("%csee's",yytext[0]);plastc();}
+{BW}are{EW}            {       printf("%cis",yytext[0]);plastc();}
+{BW}hat{EW}            {       printf("%cfedora",yytext[0]);plastc();}
+{BW}shoe                       printf("%ckicker",yytext[0]);
+{BW}"have to"{EW}      |
+{BW}has{EW}            {       printf("%cgots'ta",yytext[0]);plastc();}
+have                           printf("gots'");
+{BW}go{EW}             |
+{BW}"come over"{EW}    |
+{BW}come{EW}            {       printf("%cmosey on down",yytext[0]);plastc();}
+buy                            printf("steal");
+{BW}car{EW}             {      printf("%cwheels",yytext[0]);plastc();}
+drive                          printf("roll");
+{BW}food                       printf("%ccatfish an' colluhd greens",yytext[0]);
+{BW}eat{EW}            {       printf("%cfeed da bud",yytext[0]);plastc();}
+drink                          printf("guzzle");
+black                  |
+negro                          printf("brother");
+white                          printf("honky");
+nigger                         printf("gentleman");
+nice                           printf("supa' fine");
+{BW}person                     printf("%csucka'",yytext[0]);
+[Pp]eople                      printf("%cucka's", caseify('s'));
+{BW}thing                      thing(yytext[0]);
+house{EW}              {       printf("crib");plastc();}
+home                           printf("plantation");
+name                           printf("dojigger");
+{BW}path                       printf("%calley",yytext[0]);
+[Cc]omputer                    printf("%clunker", yytext[0]);
+or                             printf("o'");
+president                      printf("super-dude");
+"prime minister"               printf("prahm mistah");
+government                     printf("guv'ment");
+knew                           printf("knowed");
+[Bb]ecause                     printf("'%cuz", caseify('c'));
+[Yy]our                                printf("%co'", yytext[0]);
+[Ff]our                                printf("%coe", yytext[0]);
+got                            printf("gots");
+young                          printf("yung");
+you                            printf("ya'");
+You                            printf("You's");
+first                          printf("fust");
+police                         printf("honky pigs");
+{BW}string                     printf("%cchittlin'",yytext[0]);
+{BW}read                       printf("%ceyeball",yytext[0]);
+write                          printf("scribble");
+think{EW}              {       printf("thin'");plastc();}
+with                           printf("wif");
+other                          printf("uthu'");
+[Tt]hr                         printf("%c'r", yytext[0]);
+[Tt]h                          printf("%c", caseify('d'));
+ing                            printf("in'");
+{BW}a{EW}              {       printf("%csome",yytext[0]);plastc();}
+{BW}to{EW}             {       printf("%ct'",yytext[0]);
+                               if(yytext[yyleng-1]!=' ')
+                                       plastc();
+                       }
+tion                           printf("shun");
+[Aa]lmost                      printf("%cos'", caseify('m'));
+from                           printf("fum");
+[Yy]"ou're"                    printf("%couse", yytext[0]);
+alright                        |
+okay                           printf("coo'");
+[Aa]nd                         printf("%cn'", yytext[0]);
+known                          printf("knode");
+want                           printf("wants'");
+beat                           printf("whup'ed");
+ile                            printf("ah'l");
+er{EW}                 {       printf("uh");plastc();}
+[a-z]sti                       printf("%cs'i", yytext[0]);
+tute                           printf("toot");
+exp                            printf("'sp");
+exs                    |
+exc                            printf("'s");
+{BW}ex                         printf("%c'es",yytext[0]);
+[ae]ct{EW}             {       printf("%cc'", yytext[0]); plastc(); }
+like                           printf("likes");
+done                   |
+did                            printf("dun did");
+"kind of"                      printf("kind'a");
+women                          printf("honky chicks");
+{BW}man{EW}            {       printf("%cdude",yytext[0]);plastc();}
+{BW}men{EW}            |
+{BW}mens{EW}           {       printf("%cdudes",yytext[0]);plastc();}
+injured                                printf("hosed");
+killed                 |
+dead                           printf("wasted");
+good                           printf("baaaad");
+open{EW}               {       printf("jimmey");plastc();}
+opened{EW}             {       printf("jimmey'd");plastc();}
+{BW}very                       printf("%creal",yytext[0]);
+per                            printf("puh'");
+oar                            printf("o'");
+{BW}can                                printf("%ckin",yytext[0]);
+{BW}just{EW}           {       printf("%cplum",yytext[0]);plastc();}
+[Dd]etroit                     printf("Mo-town");
+[Ww]"estern "[Ee]"lectric"     printf("da' cave");
+{BW}believe                    printf("%crecon'",yytext[0]);
+[Ii]"ndianapolis"              printf("Nap-town");
+Daniel                 |
+Dan                            printf("Liva' Lips");
+Reagan                         printf("Kingfish");
+Ronald{EW}             |
+Ron{EW}                        {       printf("Rolo");plastc();}
+John                           printf("Rastus");
+Jim                            printf("Bo-Jangles");
+pontiff                        |
+pope                           printf("wiz'");
+[Pp]ravda                      printf("dat commie rag");
+broken                         printf("bugger'd");
+strange{EW}            {       printf("funky");plastc();}
+dance{EW}              {       printf("boogy");plastc();}
+ask                            printf("ax'");
+{BW}so{EW}             {       printf("%cso's",yytext[0]);plastc();}
+heard                          printf("'hoid");
+head                           printf("'haid");
+boss                           printf("main man");
+money                          printf("bre'd");
+[a-z]":"               {       *(yytext+1) = ',';
+                               printf("%s dig dis:",yytext);
+                       }
+amateur                                printf("begina'");
+radio                          printf("transista'");
+{BW}of{EW}             {       printf("%cuh",yytext[0]);plastc();}
+which                  |
+what                           printf("whut");
+"don't"                                printf("doan'");
+does                           printf("duz");
+{BW}was{EW}            |
+{BW}were{EW}           {       printf("%cwuz",yytext[0]);plastc();}
+{BW}understand                 printf("%cdig",yytext[0]);
+{BW}my                         printf("%cmah'",yytext[0]);
+again                  |
+against                                printf("agin'");
+{BW}[Ii]{EW}           {       printf("%cah'",yytext[0]);plastc();}
+meta                           printf("meta-fuckin'");
+cally                          printf("c'l");
+%%
+plastc()
+{
+       unput(yytext[yyleng-1]);
+}
+
+caseify(c)
+char c;
+{
+       if (yytext[0] <= 'Z')
+               return (c - ' ');
+       else
+               return (c);
+}
+
+thing(c)
+char c;
+{
+       static short    count = 0;
+
+       putchar(c);
+       switch (count++ % 4) {
+               case 0: case 2:
+                       printf("thang");
+                       break;
+               case 1:
+                       printf("doohickey");
+                       break;
+               case 3:
+                       printf("wahtahmellun");
+                       break;
+               }
+}
+expletive()
+{
+       static short    count = 0;
+       static short    which = 0;
+
+       if (count++ % 4 == 0) {
+               switch (which++ % 5) {
+                       case 0: printf("  What it is, Mama!"); break;
+                       case 1: printf("  Ya' know?"); break;
+                       case 2: printf("  Sheeeiit."); break;
+                       case 3: printf("  Ya' dig?"); break;
+                       case 4: printf("  Git down!"); break;
+                       }
+               }
+}
+
+/*
+ * Bugs:
+ *
+ * If a sentence starts with a keyword it doan' get converted, or:
+ * it do, but gets a leading space
+ */
diff --git a/nyc.l b/nyc.l
new file mode 100644 (file)
index 0000000..8505c16
--- /dev/null
+++ b/nyc.l
@@ -0,0 +1,97 @@
+%{
+/*
+ *     Lex filter to transform plain English into Brooklyn English.
+ *     No racial or societal slurs are intended.  For amusement only.
+ *
+ *     Copyright 1986 by Daniel Klein.
+ *
+ *     Reproduction permitted so long as this notice is retained.
+ */
+%}
+BW [ \t]
+SP [ \t]
+EW [ \t.,;!\?$]
+%%
+".so ".*$                      printf("%s", yytext);
+[ao]ther                       printf("%cdder", yytext[0]=='a'?'a':'u');
+[Nn]othing                     printf("%cuttin'", yytext[0]);
+[Tt]hin                                printf("%cin", yytext[0]);
+[Tt]hir                                printf("%coi", yytext[0]);
+[Tt]h[ei]                      printf("%c%c", caseify('d'), yytext[yyleng-1]);
+[Tt]hat                                printf("%cat", caseify('d'));
+I'm{SP}going{SP}to             printf("I'manna");
+going{SP}to                    printf("gonna");
+want{SP}to                     printf("wanna");
+t{SP}you                       printf("tcha");
+[Dd]id{SP}you{SP}[eaiou]       printf("%c'j%c", yytext[0], yytext[yyleng-1]);
+[Dd]id{SP}you                  printf("%c'ja", yytext[0]);
+[Yy]ou                         printf("%cuh", yytext[0]);
+[Hh]ow{SP}are{SP}you           printf("%cowahrya", yytext[0]);
+[Ww]ith                                printf("%cit'", yytext[0]);
+[Dd]on't                       printf("%coan", yytext[0]);
+ldn't                  |
+dn't                           printf("n't");
+isn't                          printf("ain't");
+er{EW}                 {       printf("uh"); plastc(); }
+ing{EW}                        {       printf("in'"); plastc(); }
+[Ww]ord                        |
+[Hh]eard               |
+[BbGgLlPpSs]urg                |
+[CcHh][eu]r[ntv]               printf("%coi%c", yytext[0], yytext[yyleng-1]);
+[^Mm]mer[^aeiouhrs]            printf("%cmoi%c", yytext[0], yytext[yyleng-1]);
+[Oo]re{EW}             {       printf("%cwh", caseify('a')); plastc(); }
+[Oo]r                          printf("%cwh", caseify('a'));
+[Oo]f                          printf("%chv", caseify('u'));
+tion                           printf("shun");
+alk                    |
+our[st]                        |
+or[st]                         printf("awh%c", yytext[yyleng-1]);
+ause                           printf("awze");
+[Oo]ff                         printf("%cwhf", caseify('a'));
+[Ss]tupid                      printf("%ctoopid", yytext[0]);
+{BW}under                      printf(" unner");
+{BW}to{EW}             {       printf(" tuh"); plastc(); }
+[Aa]ctual                      printf("%cckshul", yytext[0]);
+negro                          printf("spade");
+[Pp]uerto{SP}[Rr]ican          printf("%cpic", caseify('s'));
+[Ii]talian                     printf("%creaser", caseify('g'));
+[Jj]ewish                      printf("%cew boy", yytext[0]);
+[Jj]ew                         printf("%cebe", caseify('h'));
+[a-z]":"               {       *(yytext+1) = ',';
+                               printf("%s like, uhh:",yytext);
+                       }
+[a-z]"?"               {       *(yytext+1) = ',';
+                               printf("%s or what?",yytext);
+                       }
+!                              printf("!  Okay?");
+[a-z]"."               {       printf("%s", yytext);expletive();}
+%%
+plastc()
+{
+       unput(yytext[yyleng-1]);
+}
+
+caseify(c)
+char c;
+{
+       if (yytext[0] <= 'Z')
+               return (c - ' ');
+       else
+               return (c);
+}
+
+short  count = 0;
+short  which = 0;
+
+expletive()
+{
+       if (count++ % 4 == 0) {
+               switch (which++ % 5) {
+                       case 0: printf("  Okay?"); break;
+                       case 1: printf("  Right?"); break;
+                       case 2: printf("  Yuh got me so fahr?"); break;
+                       case 3: printf("  Ya' dig?"); break;
+                       case 4: printf("  Yuh with me?"); break;
+                       }
+               }
+}
This page took 0.05159 seconds and 4 git commands to generate.