02/06/84 parse_file_ The parse_file_ subroutine provides a facility for parsing ASCII text into symbols and break characters. It is recommended for occasionally used text-scanning applications. In applications where speed or frequent use are important, in-line PL/I code is recommended (to do parsing) instead. A restriction of the subroutine is that the text to be parsed must be an aligned character string. The initialization entry points, parse_file_$parse_file_init_name and parse_file_$parse_file_init_ptr, save a pointer to the text to be scanned and a character count in internal static storage. Thus, only one text can be parsed at one time. Entry points in parse_file_: (List is generated by the help command) :Entry: parse_file_: 02/06/84 parse_file_ Function: scans the text file and returns the next break character or symbol. Blanks, newline characters, and comments enclosed by /* and */, however, are skipped. Syntax: declare parse_file_ entry (fixed bin, fixed bin, fixed bin(1), fixed bin(1)); call parse_file_ (ci, cc, break, eof); Arguments: ci is an index to the first character of the symbol or break character. (Output). (The first character of the text is considered to be character 1.) cc is the number of characters in the symbol. (Output) break is set to 1 if the returned item is a break character; otherwise, it is 0. (Output) eof is set to 1 if the end of text has been reached; otherwise, it is 0. (Output) :Entry: parse_file_cur_line: 02/06/84 parse_file_$parse_file_cur_line Function: returns to the caller the current line of text being scanned. This entry is useful in printing diagnostic error messages. Syntax: declare parse_file_$parse_file_cur_line entry (fixed bin, fixed bin); call parse_file_$parse_file_cur_line (ci, cc); Arguments: ci is an index to the first character of the line. (Output). (The first character of the text is considered to be character 1.) cc is the number of characters in the line. (Output) :Entry: parse_file_init_name: 02/06/84 parse_file_$parse_file_init_name Function: initializes the subroutine given a directory and an entry point name. It gets a pointer to the desired segment and saves it for subsequent calls in internal static. Syntax: declare parse_file_$parse_file_init_name entry (char(*), char(*), ptr, fixed bin(35)); call parse_file_$parse_file_init_name (dir_name, entryname, ptr, code); Arguments: dir_name is the directory name portion of the pathname of the segment to be parsed. (Input) entryname is the entryname of the segment to be parsed. (Input) ptr is a pointer to the segment. (Output) code is a standard status code. (Output). It is zero if the segment is initiated. If nonzero, the segment cannot be initiated. It can return any code from hcs_$initiate except error_table_$segknown. :Entry: parse_file_init_ptr: 02/06/84 parse_file_$parse_file_init_ptr Function: initializes the parse_file_ subroutine with a supplied pointer and character count. It is used in cases where a pointer to the segment to be parsed is already available. Syntax: declare parse_file_$parse_file_init_ptr entry (ptr, fixed bin); call parse_file_$parse_file_init_ptr (ptr, cc); Arguments: ptr is a pointer to a segment or an aligned character string. (Input) cc is the character count of the ASCII text to be scanned. (Input) :Entry: parse_file_ptr: 02/06/84 parse_file_$parse_file_ptr Function: This entry point is identical to the parse_file_ entry point except that a pointer (with bit offset) to the break character or the symbol is returned instead of a character index. Syntax: declare parse_file_$parse_file_ptr entry (ptr, fixed bin, fixed bin(1), fixed bin(1)); call parse_file_$parse_file_ptr (ptr, cc, break, eof); Arguments: ptr is a pointer to the symbol or the break character. (Output) cc is the number of characters in the symbol. (Output) break is set to 1 if the returned item is a break character; otherwise, it is 0. (Output) eof is set to 1 if the end of text has been reached; otherwise, it is 0. (Output) :Entry: parse_file_line_no: 02/06/84 parse_file_$parse_file_line_no Function: returns to the caller the current line number of text being scanned. This entry is useful in printing diagnostic error messages. Syntax: declare parse_file_$parse_file_line_no entry (fixed bin); call parse_file_$parse_file_line_no (cl); Arguments: cl is the number of the current line. (Output) :Entry: parse_file_set_break: 02/06/84 parse_file_$parse_file_set_break Function: is used to define break characters. Normally, all nonalphanumeric characters are break characters (including blank and newline). Syntax: declare parse_file_$parse_file_set_break entry (char(*)); call parse_file_$parse_file_set_break (cs) Arguments: cs is a control string. (Input). Each character found in cs is made a break character. :Entry: parse_file_unset_break: 02/06/84 parse_file_$parse_file_unset_break Function: renders break characters as normal alphanumeric characters. It is not possible to unset blank, newline, or comment delimiters, however. These are always treated as break characters. Syntax: declare parse_file_$parse_file_unset_break entry (char(*)); call parse_file_$parse_file_unset_break (cs); Arguments: cs is a control string, each character of which is made a nonbreaking character. (Input) ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved