PARSE(5)

Table of Contents

Name

parse parses a specification file

Synopsis

VOID parse(filename)
STRING filename;

Description

This component of the run-time library is a routine which parses a specification file.

parse is the routine which parses a specification file and builds a parse tree. The root of the parse tree is always placed in the global variable top (see ANY(5) ). Normal SDTools automatically call this routine to parse the specification file that is given on the command line.

However, parse is also available to the SDTool builder for cases when the SDTool must parse more than one file. A good example of this is ivy*meta SDTB, which, in fact, is an SDTool built by ivy*meta SDTB, and an SDTool that must read multiple specification files (the source and the product description files). When bootstrapping ivy*meta SDTB, its source description file is read in the usual way as a normal specification file. The product description files, however, are parsed in the middlecode section by explicit use of the parse routine.

Any lexical or syntactic errors that are detected during parsing are reported (see REPORTINFO(5) ).

Because parse always assigns the root of the new parse tree to the variable top, the old values of top will be overridden.

See Also

GRAMMAR(2)
REPORTINFO(5)


© 1990 Lucent Technologies, Inc
© 1998 Harmony Software, Inc