April 24, 2001

A multiple-compiled file is a stream of tokens that can be interpreted by two or more compilers. The following html was produced from a file that controls a FrameMaker "batcher," yet still looks pretty good in your browser.


Title Page

Open D:\cvs-work\eng\doc\mif\titlepage.mif #
Open D:\cvs-work\eng\doc\mif\template-roman.mif

Note the clumsy pound sings at the end of two lines. They might look bad, but this is the key to the multiple-compiler. The two "Open" commands open files in FrameMaker. But the pound signs are comments. That is, when the batcher runs, everything following a pound is ignored. Therefore, to display the file in Internet Explorer, all one has to do is put the html tags after the pound signs! The code actually looks like this:

# <h2>Title Page</h2>
Open D:\cvs-work\eng\doc\mif\titlepage.mif # <br>
Open D:\cvs-work\eng\doc\mif\template-roman.mif
Now would you call this file an html file or a FrameMaker batcher file? It works in both. In fact, it works very well in both: in FrameMaker it opens the required files and formats them with the help of succeeding commands; in Internet Explorer it uses headings to highlight the sequence of commands to make it infinitely more readable. As a technical writer, I tend to think of Java files as input to the tools that will produce my printable pdf documents. I often forget that Java files actually contain source code. The fact is that they do both, but developers use javac to compile them, while writers use javadoc. Java is a language which looks closely based on C++ syntax, at least in its primitive control structures. Is it possibly then to make an ambiguous source file which both a c compiler and javac will interpret? Javadoc demonstrates that it is possible to write an infinite number of compilers for the same source code. In fact this is the principle of data storage and retrieval that defines how we use computers to store information: your entire life could be stored in a single bit if only it pointed to the right entry in a table. Boo!
Comments: Post a Comment

Recent archives