From: hagerman@ece.cmu.edu (John Hagerman) Newsgroups: alt.swedish.chef.bork.bork.bork Subject: The En-chef-er-ize-er Date: 27 Apr 93 03:01:18 GMT Organization: Carnegie Mellon University Lines: 104 (Latest changes: Apr 26, 1993.) This is the infamous en-chef-er-ize-er program. Cut the stuff below and save it in a file named "chef.x". This is input for `lex' which you must have to be able to compile this program. On most Unix-like systems, this is what you do: lex chef.x cc -o chef lex.yy.c -ll The first command uses `lex' to generate C code. The second command compiles the C code and produces the `chef' program (that is, a file called "chef" which is executable). Apparently the main reason people have problems compiling is because some newsreaders have trouble saving a file without mangling it. If lex gives you error messages, check that the file looks right (check for extra spaces or other strange characters). The `chef' program reads standard input, and writes standard output. Thus, for example, you might run it as follows: % chef "%" is the prompt Where is the chicken? You type this. Vhere-a is zee cheeckee? The program gives ... Bork Bork Bork! ... two lines of response. ^D Control-D is end-of-file. Or, if you have some English text in a file called "data", you might run it like this to put the Mock Swedish into a filed called "junk": % chef < data > junk Have fun! And send me any improvements... -- hagerman@ece.cmu.edu Bork Bork Bork!