z/OS ISPF Software Configuration and Library Manager Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Modifying the parsers

z/OS ISPF Software Configuration and Library Manager Guide and Reference
SC19-3625-00

This section describes the general design of the customizable parsers and provides several examples of updating the parsers.

The parsers read each line of the source code and process tokens on each line. Tokens are discrete elements on a line of source code; they are language-dependent. For example, consider the following COBOL statement:
        MOVE 'SMITH' TO NAME.
 
Seven tokens appear in this example: MOVE, the two single quotation marks, SMITH, TO, NAME, and the period.
State variables are used to hold the current conditions and expectations created by the processing of prior tokens in order to process the current token. For example, if a single quote is found, the single quote state variable (state.single) is turned on. All tokens, regardless of multiple lines, are ignored until the matching single quote is found, or until the end of file is reached. In the COBOL and Assembler parsers, dependency names may be enclosed in quotes; all data after the dependency name is ignored until the matching quote is found. Dependency keywords (COPY or EXEC SQL INCLUDE) inside quotes are ignored. For example, consider the following COBOL statement:
        MOVE 'COPY B' TO ACTION.
 
B will not be placed into the dependency buffer because COPY will not be processed as a dependency keyword.

Because of these state variables, dependencies, comments (in C/370™), quotes, and so on can span lines. Concatenation of keywords and dependency names (particularly in COBOL) is not supported by the parsers. If dependency names are split between lines, the partial dependency name will not be added by the REXX parser.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014