]> iEval git - filters.git/blobdiff - cockney.l
Rename lolcat to LOLCAT to avoid collision with a fine rainbow colored cat. Closes...
[filters.git] / cockney.l
index 823af7e98d609d3067590a7c72799d1ce5580c04..4cc1555dc2ff75c9096bba477586bd997258fc23 100644 (file)
--- a/cockney.l
+++ b/cockney.l
@@ -15,7 +15,15 @@ EW [ \t.,;!\?$]
 
 %Start junk
 
+%option noyywrap
+
 %%
+
+%{
+void eos();
+void plastc();
+%}
+
 <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);
@@ -89,27 +97,17 @@ ime{EW}                     {       printf("oime"); eos(); }
 
 %%
 
-eos()
+void eos()
 {
     if (yytext[yyleng-1] == '.')
-       dintI();
+    dintI();
     else
-       yyunput(yytext[yyleng-1], yytext);
-}
-
-plastc()
-{
-    yyunput(yytext[yyleng-1], yytext);
-}
-
-main()
-{
-        yylex();
+    unput(yytext[yyleng-1]);
 }
 
-int yywrap()
+void plastc()
 {
-       return 1;
+    unput(yytext[yyleng-1]);
 }
 
 caseify(c)
This page took 0.022615 seconds and 4 git commands to generate.