%Start junk
+%option noyywrap
+
+%{
+#include<time.h>
+void eos(void);
+void plastc(void);
+char caseify(char);
+void I(void);
+void bloody(void);
+void set_did(short);
+void clear_did(void);
+void dintI(void);
+void pooped(void);
+void expletive(void);
+%}
+
%%
+
<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);
%%
-eos()
+void eos()
{
if (yytext[yyleng-1] == '.')
- dintI();
+ dintI();
else
- unput(yytext[yyleng-1]);
+ unput(yytext[yyleng-1]);
}
-plastc()
+void plastc()
{
unput(yytext[yyleng-1]);
}
-caseify(c)
+char caseify(c)
char c;
{
if (yytext[0] <= 'Z')
}
-I()
+void I()
{
/* extern long random(); */
static short b_count = 0;
static short b_which = 0;
-bloody()
+void bloody()
{
if (b_count++ % 2 == 0) {
switch (b_which++ % 4) {
static short did = 0;
-set_did(val)
+void set_did(val)
+short val;
{
did = val;
}
-clear_did()
+void clear_did()
{
did = 0;
}
-dintI()
+void dintI()
{
/* extern long random(); */
clear_did();
}
-pooped()
+void pooped()
{
/* extern long random(); */
}
}
-expletive()
+void expletive()
{
/*
Blimey