The following parsing components are available:
-
Data Exchanger. The Data Exchanger supports directly
parsing name/value files, tables of data, and vectors of numbers. You
can use the Data Exchanger to parse instructions to be augmented with
arbitrary Java code through the Dynamic Java interpreter.
-
iSIGHT File Parser. The iSIGHT File Parser uses
a simplified language, similar to TCL, to specify parsing instructions.
You can use the File Parser to program complex parses.
-
Fast Parser. The Fast Parser is a simple and
fast parser, especially for inserting parameters into input files. While
the Fast Parser can read fixed-length columns of numbers, it has no programming
facilities for conditional or looping operations.
In general, the Data Exchanger is recommended for new models because it
is the most powerful parsing tool. You can use the iSIGHT File Parser
and the Fast Parser to convert iSIGHT models to Isight.
The same parsing instructions can be used in both models, and you can
directly import the parsing instructions or template files from an iSIGHT
model into an Isight
model.
The Fast Parser is the simplest to use of the three parsers,
and can read large output files rapidly if you are selecting text from
only a small portion of the file. When preparing input files, it can
be much easier to use the Fast Parser than the other parsers—you specify
the parameter and select the location to write the value and you do not
need to specify how that location is found. The Fast Parser can also
read (and, with limitations, write) columns of numbers in one simple
action. However, the numbers must be in the same relative position on
successive lines because there is no way to skip lines. Only fixed-length
columns are supported.
You may also find the Fast Parser useful for new models, if the parsing
fits within the Fast Parser’s limitations. While the Fast Parser can
support files of unlimited size at run time, the editor can support only
about a 4.5 MB template file. To read larger files, you have to use an
external editor to edit the file down to just the sections of interest,
and use the smaller file as the template.
It is possible to mix the parsers in the same model. You can also
use any of the parsers in the Simcode component, though a given Simcode
can use only one of the parsers and must use the same parser type for
the input and output parse. By mapping a file parameter between parsing
components, you can even process the same file using multiple parsers,
taking advantage of what each parser does best. For example, you can
prepare a portion of an input file using the iSIGHT File Parser and insert
it into the Fast Parser using the Include a File
option. On the output side, you can extract part of the output data using
the Fast Parser and another part using the iSIGHT File Parser.