Java Reference
In-Depth Information
LaTeX source
LaTeX to TeX
TeX to dvi
ps to printer
dvi to ps
pixels
Figure 10.2: Translation from LaTeX into print.
representation called dvi, which may in turn undergo several translations
before producing print.
Intermediate representations are often deployed to enhance portability. In
this case, TeX does not target any one printer, but instead produces a set of
binary data structures called dvi. A separate program reads the dvi intermedi-
ate representation and produces viewable or printable pages. Thus, TeX need
not undergo modification to accommodate a new kind of printer. Instead, a
new program is written (or an old one is modified) to translate the relatively
simpler dvi representation into a printer's “instruction set” (e.g., PostScript).
In consideration of the above examples, ILss in a translation system face
the following challenges:
An intermediate language must be precisely defined. Failure to define
these languages carefully can have the same negative consequences as
imprecise definitions of programming languages.
Translators and processors must be crafted for an ILs and any IRs. Where
such tools operate beyond the user's focal plane, care must be taken to
make the tools as transparent as possible. For example, C developers
may be unaware that the cpp preprocessor is invoked before the actual
C compiler.
Connections must be made between levels so that feedback from inter-
mediate steps can be related to the source program. For example, the
output fromcppmay contain errors that are caught downstreamby the C
compiler. Messages about such errors should reference the original source
lines, and not the text or line number of an intermediate representation
beyond the user's view.
 
Search WWH ::




Custom Search