/* BEGIN INCLUDE FILE . . . format_pl1_dcls.incl.pl1 */ /* DESCRIPTION: This include file contains common definitions used by the format_pl1 programs. It defines tokens, statement types, mode types, etc. */ /* HISTORY: Written by somebody, sometime. Modified: 07/15/84 by R. Michael Tague: Added the statement types: percent_abort_statement through percent_warn_statement. Added the condition is_macro_whitespace. Added the modes: mode_indbegin, mode_indbeginend, mode_indthenbegin, mode_indthenbeginend, mode_indprocbody, mode_elsestmt, mode_equalind, and mode_linconind. Added style5. */ /* format: style5 */ /* automatic */ declare temp_segs (4) pointer; /* based */ /* format_pl1_ places the unit_stack and the declare_stack after the token array */ declare 1 token (divide (sys_info$max_seg_size, 3, 19)) aligned based (temp_segs (1)), 2 string_size fixed binary (21) unaligned, 2 pad bit (5) unaligned, 2 type fixed binary (8) unaligned, 2 string_ptr pointer unaligned, 2 trailer_index fixed binary (17); declare 1 trailer (divide (sys_info$max_seg_size, 2, 19)) aligned based (temp_segs (2)), 2 string_size fixed binary (21) unaligned, 2 continued bit (1) unaligned, 2 pad bit (4) unaligned, 2 type fixed binary (8) unaligned, 2 string_ptr pointer unaligned; /* format_pl1_ places the item array and the levels array after the stmt array */ declare 1 global_header aligned based, 2 source_ptr pointer, 2 source_length fixed binary (21), 2 n_tokens fixed binary (17), 2 n_trailers fixed binary (17), 2 n_stmts fixed binary (17), 2 output_length fixed binary (21), 2 max_severity fixed binary (35), 2 modes_ptr pointer, 2 modes_length fixed binary (21), 2 ca unaligned, 3 check_comments bit (1), 3 check_strings bit (1), 3 force bit (1), 3 long bit (1), 3 record_style bit (1), 3 require_style_comment bit (1), 2 flags unaligned, 3 include_file bit (1), 3 rdc_source bit (1), 3 pad bit (28), 2 command_line_style aligned like style, 2 prevailing_style aligned like style, 2 current_style aligned like style; declare 1 global aligned based (temp_segs (3)), 2 header aligned like global_header, 2 stmt ( divide (sys_info$max_seg_size - size (global_header), 2, 19)), 3 type fixed binary (8) unaligned, 3 subtype fixed binary (8) unaligned, 3 start fixed binary (17) unaligned, 3 end fixed binary (17) unaligned, 3 pad bit (18) unaligned; declare output_string char (4 * sys_info$max_seg_size) based (temp_segs (4)); /* internal static */ declare command char (10) internal static options (constant) initial ("format_pl1"); /* token types */ declare ( no_token initial (0), invalid_char initial (1), identifier initial (2), keyword_token initial (3), isub initial (4), plus initial (5), minus initial (6), asterisk initial (7), slash initial (8), expon initial (9), not initial (10), and initial (11), or initial (12), cat initial (13), eq initial (14), ne initial (15), lt initial (16), gt initial (17), le initial (18), ge initial (19), ngt initial (20), nlt initial (21), prefix_plus initial (22), prefix_minus initial (23), assignment initial (24), colon initial (25), semi_colon initial (26), comma initial (27), period initial (28), arrow initial (29), left_parn initial (30), right_parn initial (31), percent initial (32), target_comma initial (33), comment_token initial (34), nl_vt_np_token initial (35), bit_string initial (36), char_string initial (37), fixed_bin initial (38), bin_integer initial (39), fixed_dec initial (40), dec_integer initial (41), float_bin initial (42), token_hole_1 initial (43), float_dec initial (44), token_hole_2 initial (45), i_fixed_bin initial (46), i_bin_integer initial (47), i_fixed_dec initial (48), i_dec_integer initial (49), i_float_bin initial (50), token_hole_3 initial (51), i_float_dec initial (52), token_hole_4 initial (53) ) fixed binary (8) internal static options (constant); /* token class limits */ declare ( min_delimiter_token initial (5), max_delimiter_token initial (35), min_constant_token initial (36), max_constant_token initial (53), min_arithmetic_token initial (38), max_arithmetic_token initial (53) ) fixed binary (8) internal static options (constant); /* arithmetic token type masks */ declare ( is_imaginary_constant initial ("1000"b), is_float_constant initial ("0100"b), is_decimal_constant initial ("0010"b), is_integral_constant initial ("0001"b) ) bit (4) aligned internal static options (constant); /* lexical limits */ declare ( max_bit_string_constant initial (253), max_char_string_constant initial (254), max_identifier_length initial (256) ) fixed binary internal static options (constant); /* statement types */ declare ( unknown_statement initial (0), allocate_statement initial (1), assignment_statement initial (2), begin_statement initial (3), call_statement initial (4), close_statement initial (5), declare_statement initial (6), lock_statement initial (7), delete_statement initial (8), display_statement initial (9), do_statement initial (10), else_clause initial (11), end_statement initial (12), entry_statement initial (13), exit_statement initial (14), format_statement initial (15), free_statement initial (16), get_statement initial (17), goto_statement initial (18), if_statement initial (19), locate_statement initial (20), null_statement initial (21), on_statement initial (22), open_statement initial (23), procedure_statement initial (24), put_statement initial (25), read_statement initial (26), return_statement initial (27), revert_statement initial (28), rewrite_statement initial (29), signal_statement initial (30), stop_statement initial (31), system_on_unit initial (32), unlock_statement initial (33), wait_statement initial (34), write_statement initial (35), default_statement initial (36), condition_prefix_list initial (37), label_prefix_list initial (38), percent_statement initial (39), percent_abort_statement initial (40), percent_default_statement initial (41), percent_else_statement initial (42), percent_elseif_statement initial (43), percent_endif_statement initial (44), percent_error_statement initial (45), percent_if_statement initial (46), percent_include_statement initial (47), percent_page_statement initial (48), percent_print_statement initial (49), percent_replace_statement initial (50), percent_set_statement initial (51), percent_skip_statement initial (52), percent_warn_statement initial (53) ) fixed binary (8) internal static options (constant); declare is_independent_statement (0:53) bit (1) aligned internal static options (constant) initial ("0"b, (2) (1)"1"b, "0"b, (2) (1)"1"b, "0"b, (3) (1)"1"b, (4) (1)"0"b, "1"b, "0"b, (8) (1)"1"b, "0"b, (11) (1)"1"b, (18) (1)"0"b); declare is_macro_statement (0:53) bit (1) aligned internal static options (constant) initial ((39) (1)"0"b, (15) (1)"1"b); declare is_macro_whitespace (0:53) bit (1) aligned internal static options (constant) initial ((39) (1)"0"b, (3) (1)"1"b, (3) (1)"0"b, "1"b, "0"b, (7) (1)"1"b); /* statement subtypes */ declare ( subtype_none initial (0), subtype_noniterative_do initial (1) ) fixed binary (8) internal static options (constant); /* style structures and constants */ declare 1 style aligned based, 2 switches (26) bit (1) unaligned, 2 pad bit (10) unaligned, 2 values (10) fixed binary; /* named modes for format_pl1_ */ declare ( mode_on defined (global.current_style.switches (1)), mode_inddcls defined (global.current_style.switches (2)), mode_delnl defined (global.current_style.switches (3)), mode_insnl defined (global.current_style.switches (4)), mode_indattr defined (global.current_style.switches (5)), mode_linecom defined (global.current_style.switches (6)), mode_case defined (global.current_style.switches (7)), mode_ifthenstmt defined (global.current_style.switches (8)), mode_ifthendo defined (global.current_style.switches (9)), mode_ifthen defined (global.current_style.switches (10)), mode_indthenelse defined (global.current_style.switches (11)), mode_indnoniterdo defined (global.current_style.switches (12)), mode_indnoniterend defined (global.current_style.switches (13)), mode_indcomtxt defined (global.current_style.switches (14)), mode_thendo defined (global.current_style.switches (15)), mode_inditerdo defined (global.current_style.switches (16)), mode_indend defined (global.current_style.switches (17)), mode_indproc defined (global.current_style.switches (18)), mode_indcom defined (global.current_style.switches (19)), mode_indblkcom defined (global.current_style.switches (20)), mode_indbegin defined (global.current_style.switches (21)), mode_indbeginend defined (global.current_style.switches (22)), mode_indthenbegin defined (global.current_style.switches (23)), mode_indthenbeginend defined (global.current_style.switches (24)), mode_indprocbody defined (global.current_style.switches (25)), mode_elsestmt defined (global.current_style.switches (26)) ) bit (1); declare ( mode_ind defined (global.current_style.values (1)), mode_ll defined (global.current_style.values (2)), mode_initcol defined (global.current_style.values (3)), mode_declareind defined (global.current_style.values (4)), mode_dclind defined (global.current_style.values (5)), mode_idind defined (global.current_style.values (6)), mode_struclvlind defined (global.current_style.values (7)), mode_comcol defined (global.current_style.values (8)), mode_equalind defined (global.current_style.values (9)), mode_lineconind defined (global.current_style.values (10)) ) fixed binary; /* mode names */ declare switch_mode_names (26) char (15) internal static options (constant) initial ("on", "inddcls", "delnl", "insnl", "indattr", "linecom", "case", "ifthenstmt", "ifthendo", "ifthen", "indthenelse", "indnoniterdo", "indnoniterend", "indcomtxt", "thendo", "inditerdo", "indend", "indproc", "indcom", "indblkcom", "indbegin", "indbeginend", "indthenbegin", "indthenbeginend", "indprocbody", "elsestmt"); declare switch_antonym_names (26) char (4) internal static options (constant) initial ("off", (5) (1)"", "tree", (19) (1)""); declare value_mode_names (10) char (12) internal static options (constant) initial ("ind", "ll", "initcol", "declareind", "dclind", "idind", "struclvlind", "comcol", "equalind", "lineconind"); /* predefined styles */ /* style1: on,inddcls,^delnl,^insnl,indattr,^linecom,case,^ifthenstmt,^ifthendo,^ifthen,^indthenelse,indnoniterdo, ^indnoniterend,^indcomtxt,^thendo,inditerdo,^indend,^indproc,^indcom,indblkcom,indbegin,^indbeginend,indthenbegin,^indthenbeginend,indprocbody,elsestmt,ind5,ll122,initcol6,declareind8, dclind8,idind23,struclvlind2,comcol61,equalind0,lineconind5 style2: style1,delnl,insnl style3: style2,^inddcls,declareind10,dclind10,idind20 style4: style1,^inddcls,^indattr,linecom,ifthendo,^indnoniterdo,indcomtxt,^inditerdo,indproc,^indthenbegin,declareind9,dclind5 style5: style2,linecom,ifthen,^indnoniterdo,indnoniterend,indcomtxt,^indthenbegin,indthenbeginend,^indprocbody,^elsestmt,ind8,ll80,initcol0,idind24,comcol57,lineconind4 */ declare 1 styles (5) aligned internal static options (constant), 2 switches (26) bit (1) unaligned initial ("1"b, "1"b, "0"b, "0"b, "1"b, "0"b, "1"b, "0"b, "0"b, "0"b, "0"b, "1"b, "0"b, "0"b, "0"b, "1"b, "0"b, "0"b, "0"b, "1"b, "1"b, "0"b, "1"b, "0"b, "1"b, "1"b, /* style1 */ "1"b, "1"b, "1"b, "1"b, "1"b, "0"b, "1"b, "0"b, "0"b, "0"b, "0"b, "1"b, "0"b, "0"b, "0"b, "1"b, "0"b, "0"b, "0"b, "1"b, "1"b, "0"b, "1"b, "0"b, "1"b, "1"b, /* style2 */ "1"b, "0"b, "1"b, "1"b, "1"b, "0"b, "1"b, "0"b, "0"b, "0"b, "0"b, "1"b, "0"b, "0"b, "0"b, "1"b, "0"b, "0"b, "0"b, "1"b, "1"b, "0"b, "1"b, "0"b, "1"b, "1"b, /* style3 */ "1"b, "0"b, "0"b, "0"b, "0"b, "1"b, "1"b, "0"b, "1"b, "0"b, "0"b, "0"b, "0"b, "1"b, "0"b, "0"b, "0"b, "1"b, "0"b, "1"b, "1"b, "0"b, "0"b, "0"b, "1"b, "1"b, /* style4 */ "1"b, "1"b, "1"b, "1"b, "1"b, "1"b, "1"b, "0"b, "0"b, "1"b, "0"b, "0"b, "1"b, "1"b, "0"b, "1"b, "0"b, "0"b, "0"b, "1"b, "1"b, "0"b, "0"b, "1"b, "0"b, "0"b), /* style5 */ 2 pad bit (10) unaligned initial ((5) (1)""b), 2 values (10) fixed binary initial (5, 122, 6, 8, 8, 23, 2, 61, 0, 5, /* style1 */ 5, 122, 6, 8, 8, 23, 2, 61, 0, 5, /* style2 */ 5, 122, 6, 10, 10, 20, 2, 61, 0, 5, /* style3 */ 5, 122, 6, 9, 5, 23, 2, 61, 0, 5, /* style4 */ 8, 80, 1, 8, 8, 24, 2, 57, 0, 4); /* style5 */ /* control comment constants */ declare control_comment_indicator char (7) internal static options (constant) initial ("format:"); declare mode_separator char (1) internal static options (constant) initial (","); declare revert_mode char (6) internal static options (constant) initial ("revert"); declare style_mode char (5) internal static options (constant) initial ("style"); declare switch_mode_not_indicator char (1) internal static options (constant) initial ("^"); /* if statement control comments */ declare case_control_comment char (10) internal static options (constant) initial ("/* case */"); declare tree_control_comment char (10) internal static options (constant) initial ("/* tree */"); /* comment indicator constants */ declare comment_indicator_extra_chars char (3) internal static options (constant) initial ((3)"*"); declare comment_indicator_no_indcomtxt char (1) internal static options (constant) initial ("^"); /* external static */ declare sys_info$max_seg_size fixed binary (19) external static; /* entry */ declare format_pl1_lex_ entry ((*) pointer); declare format_pl1_stmt_type_ entry ((*) pointer); declare format_pl1_ entry ((*) pointer); declare format_pl1_modes_ entry ((*) pointer, char (*), pointer, bit (1), bit (1)); declare format_pl1_record_style_ entry ((*) pointer, fixed binary (21), fixed binary); declare format_pl1_long_ entry ((*) pointer, pointer); declare format_pl1_error_ entry ((*) pointer, fixed binary (35), char (*), pointer); /* END INCLUDE FILE . . . format_pl1_dcls.incl.pl1 */ */ ----------------------------------------------------------- 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 */