!+ ! NAME ! HANDLE_EXCLUDE_FILE -- reads in exclusion list file ! ! DESCRIPTION ! This routine processes an exclusion list file that contains a list ! of any PSECT names that are known to have inconsistencies and a ! list of any undefined symbols that should be ignored and not show up ! in the output report. ! ! It reads this file in and sets up a tree of these symbols. ! ! The file has a format of one symbol per line starting in column 1; ! lines with '!' in column one are considered comment lines. ! ! RETURN VALUE ! ! HISTORY ! 4-14-88 Bauer Initial implementation. ! !- MODULE HANDLE$EXCLUDE_FILE IDENT 'v1.0'; ! ! SET Declarations ! SET digit ( '0' .. '9' ); SET alpha ( 'a'.. 'z' OR 'A'..'Z'); SET id_part ( alpha OR digit OR '_' OR '$' ); SET id_start ( alpha OR digit OR '_' OR '$' ); ! ! TOKEN Declarations ! TOKEN id { id_start [id_part...] }; TOKEN exclaim ALIAS '!' { '!' }; ! For comment lines TOKEN eol { s'eol' }; ! ! Global Data Declarations ! DECLARE input_file_name : STRING; ! Exclude file name DECLARE exclude_tree : EXTERNAL TREE(STRING) OF BOOLEAN; ! Tree of symbols ! ! CONSTANT Declarations ! CONSTANT SS$_NORMAL EXTERNAL INTEGER; !+ ! There are two macros in this file: ! ! comment_line ! any_line ! !- ! ! This macro handle comment lines ! MACRO comment_line SYNTAX { COLUMN (1) '!' FIND (s'eol') eol }; /* DO NOTHING */ END MACRO; ! ! This macro handles symbol lines ! MACRO any_line TRIGGER { comment_line | exclude_name: id FIND (s'eol') eol }; IF exclude_name <> '' THEN exclude_tree(exclude_name) = TRUE; ELSE write 'Comment line!'; END IF; END MACRO; !+ ! NAME ! handle_exclude_file -- driver for this module ! ! DESCRIPTION ! Scans the exclude file and builds list of psect ! names or undefined symbol names in a tree. ! ! RETURN VALUE ! Always 1. ! ! HISTORY ! 4-14-88 Bauer Initial implementation. !- PROCEDURE handle_exclude_file ( what_exclude_file: STRING ) OF INTEGER; START SCAN INPUT FILE what_exclude_file OUTPUT FILE 'NL:'; RETURN (SS$_NORMAL); ! Always returns success unless input exclude ! file is missing where SCAN will fail END PROCEDURE; END MODULE;