next up previous contents
Next: MathML to IR Module Up: Program Design and Implementation Previous: The Intermediate Representation   Contents

Use of Tables in the Translation Process

The complexity and diversity of MathML and OpenMath elements require that a translator has some way of keeping information concerning all elements. The parsing and generation of OpenMath requires a translator to have some way of knowing which content dictionaries symbols belong to. Similarly, the correct procedures must be employed upon each element encountered. This information must be stored in a readily accessible way. It is important to design these tables and that we understand how each module will use them to appropriately accomplish their tasks.

The information guiding the translator can be either hand coded into the program or gathered into tables. Hand coding is complex and useful only in situations where an element needs to be handled in a very precise way. Tables however can contain organized information related to each element useful when parsing and generating expressions.

We believe using a table-based system is more efficient for our application and can produce better and more compact code, thus improving code readability, extensibility and maintenance. Because a translator must deal with a variety of elements, most of similar structure, a table-based system permits the translator to relate an element to a set of functions and/or information. This way, any modifications of the MathML standard can be easily adapted to by modifying a table or adding a new entry to it.

The idea is to gather in a few tables all the necessary information for properly handling all MathML and OpenMath recognized elements. Let us describe the main tables4.1 which are used by the interface. To better understand the system we will describe how they should be used by each module to accomplish the task.



Subsections
next up previous contents
Next: MathML to IR Module Up: Program Design and Implementation Previous: The Intermediate Representation   Contents
root
2000-05-01