X-Git-Url: http://git.ieval.ro/?a=blobdiff_plain;f=cockney.l;h=f6d0ad202958460041f56bb34a2264b86406019f;hb=9a251f025acb9f5b7df2753fd5c3828e947d5e59;hp=e6c0bdae91e4d1a25cdf7b96c064453dab24ce77;hpb=dc17484ae227d51938596b51191e2f1991b7ca51;p=filters.git diff --git a/cockney.l b/cockney.l index e6c0bda..f6d0ad2 100644 --- 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]); + } +%} + . { 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,19 +103,6 @@ ime{EW} { printf("oime"); eos(); } %% -eos() -{ - if (yytext[yyleng-1] == '.') - dintI(); - else - unput(yytext[yyleng-1]); -} - -plastc() -{ - unput(yytext[yyleng-1]); -} - caseify(c) char c; {