BW [ \t]
SP [ \t]
EW [ \t.,;!\?$]
+
+%{
+ void plastc(void);
+ char caseify(char);
+ void expletive(void);
+%}
+
%%
".so ".*$ printf("%s", yytext);
[ao]ther printf("%cdder", yytext[0]=='a'?'a':'u');
! printf("! Okay?");
[a-z]"." { printf("%s", yytext);expletive();}
%%
-plastc()
+
+void plastc()
{
- unput(yytext[yyleng-1]);
+ yyunput(yytext[yyleng-1], yytext);
}
-caseify(c)
+char caseify(c)
char c;
{
if (yytext[0] <= 'Z')
short count = 0;
short which = 0;
-expletive()
+void expletive()
{
if (count++ % 4 == 0) {
switch (which++ % 5) {
}
}
}
+
+int yywrap()
+{
+ return 1;
+}