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


FLMLRC2 C, C++, and Resource file parser for workstation source

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

Purpose

The FLMLRC2 parser supports C, C++ and resource files. The parser is written in REXX. The includes found by the parser are associated with an include set that is the extension from the include statement (see FLMINCLS macro).

Functions

The parser uses the following syntax rules to locate dependency names:
  • The search for tokens is restricted to uncommented text.

    The character strings /* and */ are recognized as comment delimiters that can span lines. The character string // is recognized as a begin comment token where the comment ends at the end of the line.

  • Include dependencies are generated in the following conditions:
    • The first token on the line is #include. The included file name can be surrounded by double quotes ("file.ext") or by angle brackets (<file.ext>).
    • Dependencies are generated for some resource compiler statements. The statements support options between the statement and the include name, so the include name is taken as the last token on the line. Some of these statements have a format for includes and a format that does not support includes. The parser only finds includes when the statement does not contain a comma. The following statements are recognized as include statements:
      BITMAP
      FONT
      ICON
      POINTER
      RESOURCE
      RCINCLUDE
      DLGINCLUDE
  • Tokens inside strings are ignored.

Include names are generated after removing excess characters (all characters up to and including the rightmost directory separator character, if any, and all characters from the first '.' to the end of the file name). The default is \. Any underscore characters (_) or blanks are replaced by at-signs ('@'). Include names longer than eight characters are truncated to eight characters and a return code of 4 is issued. The include-set names are generated from the characters following the first '.' to the end of the file name. Include-set names are also truncated to eight characters and underscore characters and blanks are replaced by at-signs. The following table illustrates how include and include-set names are derived from source statements.

Table 1. Examples of include and include-set names derived from source statements
Source statement Include name Include-set name
#include "abc" abc  
#include "abc.h" abc h
ICON 97, 101, 10, 10, 0, 0    
ICON ID_WINDOW mahjongg.ico mahjongg ico
#include "my file.h" my@file h

Another function of the parser is to gather statistics or metrics for each module to be parsed. SCLM saves 10 statistics, but only 4 are generated by this parser. This parser defines the ten statistics as follows:

Total lines
The total number of records in the file.
Comment lines
This value is always 0.
Noncomment lines
This is the same as the total lines.
Blank lines
The number of lines that contain only blanks.
Prolog lines
This value is always 0.
Total statements
This value is always 0.
Comment statements
The total number of /* */ pairs in the member.
Control statements
This value is always 0.
Assignment statements
This value is always 0.
Noncomment statements
This value is always 0.

Parameters

The following guidelines apply when specifying parameters:
  • The order of the parameters is not important.
  • See the language definitions provided by SCLM for the actual use of the parameters for FLMLRC2.
  • The directory separator character defaults to \.

The DIR_SEPARATOR keyword parameter may be used to specify a directory separator character.

The following keyword parameters, separated by commas, are required as input to FLMLRC2
LISTINFO
Pointer to the SCLM list information record. This parameter is required and must be set to @@FLMLIS.
LISTSIZE
The size of the LISTINFO buffer. This parameter is required and must be set to @@FLMSIZ. The parser checks to make sure that the LISTSIZE parameter is large enough to hold at least one entry of 228 bytes.
STATINFO
Pointer to the SCLM statistics information record. This parameter is required and must be set to @@FLMSTP.

Return codes

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014