996
|
1 yapp stands for "yet another program printer", or "yet another
|
|
2 printing program", or maybe "yet another printer printer". yapp is a
|
|
3 program that prints out programs that print out.
|
|
4
|
|
5 That is, yapp takes whatever is piped into its standard input, and
|
|
6 produces on its standard output the source code for an INTERCAL
|
|
7 program that will, when compiled, produce the original file. The
|
|
8 created program will be self-contained; it will not need the system
|
|
9 library to compile. The reason for this is to maximize the amount of
|
|
10 data that yapp can encode into an INTERCAL program. The current
|
|
11 compiler has an upper bound on the number of commands one program can
|
|
12 have; thus yapp will not produce a compilable program if given more
|
|
13 than 3880 bytes.
|
|
14
|
|
15 Though yapp was intended to create standalone programs, it can also be
|
|
16 used to generate subroutines. (In fact, the first working version of
|
|
17 this program was used to generate the lines for the final draft.) In
|
|
18 such a case, it is convenient to specify what character the data will
|
|
19 "follow". The easiest way to accomplish this is to replace the "DO .9
|
|
20 <- #0" in line 22 with "DO .9 <- <num>", where <num> is the
|
|
21 bit-reversed code of the character preceeding the data (#80 in the
|
|
22 case of a newline, for example). A more versatile modification is to
|
|
23 change line 22 to "DO WRITE IN .9", and then insert the character code
|
|
24 at the top of the file that is to be fed to yapp. Thus, if the data in
|
|
25 the file would follow a newline, the line "EIGHT OH" would be added to
|
|
26 the top of the data file.
|