* Better flex fixups; make sure to link with -lfl even if building
[filters.git] / cockney.l
index 823af7e98d609d3067590a7c72799d1ce5580c04..f6d0ad202958460041f56bb34a2264b86406019f 100644 (file)
--- a/cockney.l
+++ b/cockney.l
@@ -16,6 +16,20 @@ EW [ \t.,;!\?$]
 %Start junk
 
 %%
+
+%{
+       void eos() {
+           if (yytext[yyleng-1] == '.')
+               dintI();
+           else
+               unput(yytext[yyleng-1]);
+       }
+
+       void plastc() {
+           unput(yytext[yyleng-1]);
+       }
+%}
+
 <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,29 +103,6 @@ ime{EW}                     {       printf("oime"); eos(); }
 
 %%
 
-eos()
-{
-    if (yytext[yyleng-1] == '.')
-       dintI();
-    else
-       yyunput(yytext[yyleng-1], yytext);
-}
-
-plastc()
-{
-    yyunput(yytext[yyleng-1], yytext);
-}
-
-main()
-{
-        yylex();
-}
-
-int yywrap()
-{
-       return 1;
-}
-
 caseify(c)
 char c;
 {
This page took 0.01041 seconds and 4 git commands to generate.