PARAMETER PARSING


Richard Duncan
Institute for Signal and Information Processing
Mississippi State University
Phone/Fax: 601-325-8335/3149 Email: duncan@isip.msstate.edu

ABSTRACT:

The file parsing routines used to extract information from user-formatted parameter files are far from new technology. The tendency in software design, however, is to re-invent these methods for every new piece of software. This creates a problem in two-fold. First, a significant amount of time is wasted in redeveloping existing technology. Secondly, different implementors may choose to develop languages with varying complexity, so file conventions accepted by program may not work with another.

We have developed a generic parser class for name=value assignment languages. It sits atop Sof in our environment, multiple-data objects use the Parser in reading ASCII Sof files. It also supports the string parsing routines typical for parameter settings, including tokenization, quoting, and literal character translation. While the user has some control on special characters, the finite state transducer is hard-coded for a pre-defined assignment language format.

This seminar will delve into the implementation issues of the Parser class. One hot topic is where the data is stored -- can it be left on disk or does it need to be stored in memory? The interface to other classes needs to be as simple as possible, but in passing array pointers (such as strings) one must be careful to avoid memory leaks. These and other issues will be hammered out so as to create an easily usable and efficient Parser class.