摘要 |
A mapper to translate an input file from an input domain to an output domain. The mapper includes a canons utility which builds a canon, the canon being a tree relating all data attributes within a domain of information, and the domain being a collection of data that has a same data format, a maps utility which creates input and output maps that specify the translation from the input domain to the output domain, and a translator utility to perform the translation of the input file to an output file. The input map is a data structure that describes a format of the input domain and the output map is a data structure that describes a format of the output domain. The input map and the output map are derivation trees, and the mapper utilizes the input map and the output map to build a scanner/parser for the input file domain. The mapper traverses the input map to parse data from the input file into a list. The mapper then maps from the list to the output domain to generate the output file by traversing the output map and reinterpreting a corresponding element in the list such that the corresponding element conforms to the output domain.
|