The TDF encoding as a bitstream is expressed as a series of macros
generated by the
make_tdf tool from the TDF specification
database. Note that the version of the TDF database used contains
a couple of corrections from the standard version:
make_token_defhas been added to represent a token definition.
diag_taghas been added to the edge constructors.
make_tdfgenerates a macro:
void ENC_plus ( BITSTREAM * ) ;which encodes the
plusconstruct (91 as 7 bits in extended format). A typical use of this macro, for adding the expressions
ENC_plus ( bs ) ; ENC_impossible ( bs ) ; bs = enc_exp ( bs, a ) ; bs = enc_exp ( bs, b ) ;
Each function or variable is compiled to TDF as its definition is encountered. For some definitions, such as inline functions, the compilation may be deferred until it is clear whether or not the identifier has been used. There is a final pass over all identifiers during the variable analysis routines which incorporates this check. Because of the organisation of a TDF capsule it is necessary to store all of the compiled TDF in memory until the end of the program, when the complete capsule, including external tag and token names and linkage information, is written to the output file.
Part of the TenDRA Web.
Crown Copyright © 1998.