X-Git-Url: http://git.ieval.ro/?p=filters.git;a=blobdiff_plain;f=jive.l;h=ff6d21f10e698cb32899fd7d19b681e69de4eedf;hp=750b3cdb9a5921db2c605cf0f0313a2d3383718a;hb=HEAD;hpb=7f4e9d5ed94ae3d89fa2548194ef0bf190368080 diff --git a/jive.l b/jive.l index 750b3cd..ff6d21f 100644 --- a/jive.l +++ b/jive.l @@ -17,7 +17,17 @@ %o 1500 BW [ \t\(] EW [ \t.,;!\?$\)] +%option noyywrap + +%{ + void plastc(void); + char caseify(char); + void expletive(void); + void thing(char); +%} + %% + @[Bb]egin(.*) | ".so ".*$ printf("%s", yytext); {BW}send printf("%ct'row",yytext[0]); @@ -195,12 +205,13 @@ against printf("agin'"); meta printf("meta-fuckin'"); cally printf("c'l"); %% -plastc() + +void plastc() { - yyunput(yytext[yyleng-1], yytext); + unput(yytext[yyleng-1]); } -caseify(c) +char caseify(c) char c; { if (yytext[0] <= 'Z') @@ -209,7 +220,7 @@ char c; return (c); } -thing(c) +void thing(c) char c; { static short count = 0; @@ -227,7 +238,8 @@ char c; break; } } -expletive() + +void expletive() { static short count = 0; static short which = 0; @@ -243,16 +255,6 @@ expletive() } } -main() -{ - yylex(); -} - -int yywrap() -{ - return 1; -} - /* * Bugs: *