'Exchange' is a program which exchanges one list of
tokens for another within a file. It can be used to exchange
Pascal symbols for C, or C for Pascal, or even Turbo Pascal
symbols for Pascal MT+ symbols. 'Exchange' does not
translate from one language to another for you; it does do
the tedious part.
To use Exchange, type
exchange tokenfile oldfile newfile
where 'tokenfile' is the name of the file of tokens,
'oldfile' is an existing file to be changed, and 'newfile' is
the name of the file after the exchanges are completed.
The token file is created with any plain text editor and
is made up of pairs of tokens, with each token on its own
line. The first line of each pair is a token to search for.
Whenever one of these is found, the token on the second line
of the pair is used to replace it.
When Exchange scans for old tokens, the longest token
which can be matched is always used. Blanks can be part of a
token, even at the end of a line. If you want your tokens to
include trailing blanks, make sure your text editor does not
automatically strip them.
The token file 'c2p.exc' converts C tokens to Pascal
tokens; 'p2c.exc' goes the other way. You may want to change
these for your own compilers and preferences. Of course,
exchange can be used for many other languages and purposes by
simply creating new token files.
'Exchange' is in the public domain. 'Exchange' works
under the MSDOS and PCDOS operating systems.