There are two example integrated preprocessors for you to look at; these have been designed to be stacked. Also provided are an example source program and an example copyfile for the preprocessors to process. By copying and pasting these, you could create projects to contain these files and see how they work, or you could create your own preprocessors based on these examples:
Example - the preproc.cbl Program
Example - the preprox.cbl Program
The example preprocessors can be used as a basis for other preprocessors. They demonstrate the following:
The example preprocessors recognize and process several verbs as follows:
In order to demonstrate stackable preprocessors, these functions are split into two separate programs. The two preprocessors are very similar, containing much common code.
The preprocessors include an example of a lexical analyzer for COBOL, which handles lexical tokens that do not continue across records.
The files asmcobol.cbl and working.cbl contain commands that can be interpreted by preprocessing the files using compiled versions of the Preproc or Preprox example preprocessors.
Example - the asmcobol.cbl Program
Example - the working.cbl Program
Related Topics: