COMPILATION LISTING OF SEGMENT linus_lila_build_expr_str Compiled by: Multics PL/I Compiler, Release 28e, of February 14, 1985 Compiled at: Honeywell Multics Op. - System M Compiled on: 07/29/86 1002.3 mst Tue Options: optimize map 1 2 /* *********************************************************** 3* * * 4* * * 5* * Copyright, (C) Honeywell Information Systems Inc., 1981 * 6* * * 7* * * 8* *********************************************************** */ 9 10 /* ****************************************************** 11* * * 12* * * 13* * Copyright (c) 1972 by Massachusetts Institute of * 14* * Technology and Honeywell Information Systems, Inc. * 15* * * 16* * * 17* ****************************************************** */ 18 19 linus_lila_build_expr_str: 20 proc (lcb_ptr, lsh_ptr, td_ptr, ex_ptr, ex_var, code); 21 22 /* DESCRIPTION: 23* 24* This procedure translates a linus expression into an equivalent MRDS 25* expression, suitable for inclusion in a MRDS -where clause. 26* 27* 28* 29* HISTORY: 30* 31* 77-08-01 J. A. Weeldreyer: Initially written. 32* 33* 78-04-01 J. A. Weeldreyer: Modified to give better diagnostics for 34* constant expr. and scalar fun. 35* 36* 78-08-01 J. A. Weeldreyer: Modified to conform to new token data. 37* 38* 80-04-13 Rickie E. Brinegar: Modified to use a work area defined on 39* lcb.lila_area_ptr instead of getting system free area. 40* 41* 80-12-01 Rickie E. Brinegar: Modified to remove the un referenced 42* linus_select_info.incl.pl1 file. 43* 44* 81-07-15 Rickie E. Brinegar: Removed useless cleanup condition handler. 45* 46* 81-11-02 DJ Schimke: Modified to allow constants to be first operand of an 47* expression rather than just attributes. Modified internal procedure reduce 48* to eliminate possible stringrange condition. 49**/ 50 1 1 /* BEGIN INCLUDE FILE linus_lcb.incl.pl1 -- jaw 8/30/77 */ 1 2 1 3 1 4 1 5 /****^ HISTORY COMMENTS: 1 6* 1) change(86-04-23,Dupuis), approve(86-05-23,MCR7188), audit(86-07-23,GWMay), 1 7* install(86-07-29,MR12.0-1106): 1 8* Added general_work_area_ptr and renamed sfr_ptr to 1 9* force_retrieve_scope_ptr. 1 10* END HISTORY COMMENTS */ 1 11 1 12 1 13 /* HISTORY: 1 14* 1 15* 78-09-29 J. C. C. Jagernauth: Modified for MR7.0. 1 16* 1 17* 81-05-11 Rickie E. Brinegar: added security bit and andministrator bit as 1 18* a part of the attribute level control work. 1 19* 1 20* 81-06-17 Rickie E. Brinegar: deleted the sd_ptr as a part of removing the 1 21* scope_data structure from LINUS. LINUS now depends totally on MRDS for 1 22* scope information. 1 23* 1 24* 81-11-11 Rickie E. Brinegar: added the timing bit and three fields for 1 25* retaining various vcpu times to be collected when in timing mode. The 1 26* times to be collected are: LINUS parsing time, LINUS processing time, and 1 27* MRDS processing time. 1 28* 1 29* 82-01-15 DJ Schimke: Added the build_increment and build_start fields as 1 30* part of the line numbering implementation. This allows for possible later 1 31* LINUS control of the build defaults. 1 32* 1 33* 82-03-01 Paul W. Benjamin: Removed linus_prompt_chars_ptr, as that 1 34* information is now retained by ssu_. Removed parse_timer as no longer 1 35* meaningful. Added linus_version. Added iteration bit. Added 6 entry 1 36* variables for ssu_ replaceable procedures. Added actual_input_iocbp. 1 37* 1 38* 82-06-23 Al Dupuis: Added subsystem_control_info_ptr, 1 39* subsystem_invocation_level, and selection_expression_identifier. 1 40* 1 41* 82-08-26 DJ Schimke: Added report_control_info_ptr, and 1 42* table_control_info_ptr. 1 43* 1 44* 82-10-19 DJ Schimke: Added ssu_abort_line. 1 45* 1 46* 83-06-06 Bert Moberg: Added print_search_order (pso) and no_optimize (no_ot) 1 47* 1 48* 83-04-07 DJ Schimke: Added temp_seg_info_ptr. 1 49* 1 50* 83-08-26 Al Dupuis: Added query_temp_segment_ptr. 1 51**/ 1 52 1 53 dcl 1 lcb aligned based (lcb_ptr), /* LINUS control block */ 1 54 2 db_index fixed bin (35), /* index of open data base, or 0 */ 1 55 2 rb_len fixed bin (21), /* length of request buffer */ 1 56 2 lila_count fixed bin (35), /* number of LILA text lines */ 1 57 2 lila_chars fixed bin (35), /* number of LILA source test chars */ 1 58 2 trans_id fixed bin (35), /* used by checkpoint and rollback facilities (MR7.0) */ 1 59 2 lila_fn char (32) unal, /* entry name of lila data file */ 1 60 2 prompt_flag bit (1) unal, /* on if in prompt mode */ 1 61 2 test_flag bit (1) unal, /* on if in test mode */ 1 62 2 new_version bit (1) unal init (1), /* on for new version data base (MR7.0) */ 1 63 2 secured_db bit (1) unal, /* on if the db is in a secure state */ 1 64 2 administrator bit (1) unal, /* on if the user is a db administrator */ 1 65 2 timing_mode bit (1) unal, /* on if timing is to be done */ 1 66 2 iteration bit (1) unal, /* interpret parens as iteration sets */ 1 67 2 pso_flag bit (1) unal, /* add print_search_order to select */ 1 68 2 no_ot_flag bit (1) unal, /* add no_optimize to select */ 1 69 2 reserved bit (27) unal, 1 70 2 liocb_ptr ptr, /* iocb ptr for lila file */ 1 71 2 rb_ptr ptr, /* ptr to request buffer */ 1 72 2 is_ptr ptr, /* iocb ptr for currentinput stream switch */ 1 73 2 cal_ptr ptr, /* ptr to current arg list for invoke (or null) */ 1 74 2 ttn_ptr ptr, /* pointer to table info structure */ 1 75 2 force_retrieve_scope_info_ptr ptr, /* structure pointer to force retrieve scope operation */ 1 76 2 lv_ptr ptr, /* pointer linus variables */ 1 77 2 si_ptr ptr, /* pointer to select_info structure */ 1 78 2 setfi_ptr ptr, /* pointer to set function information */ 1 79 2 sclfi_ptr ptr, /* pointer to user declared scalar fun. names */ 1 80 2 ivs_ptr ptr, /* pointer to stack of invoke iocb pointers */ 1 81 2 lit_ptr ptr, /* pointer to literal pool */ 1 82 2 lvv_ptr ptr, /* pointer to linus variable alloc. pool */ 1 83 2 rd_ptr ptr, /* point to readied files mode information (MR7.0) */ 1 84 2 rt_ptr ptr, /* point to table of relation names and their readied modes 1 85* (MR7.0) */ 1 86 2 actual_input_iocbp ptr, /* ptr to input while in macros */ 1 87 2 lila_promp_chars_ptr ptr, /* pointer to the prompt characters for lila */ 1 88 2 linus_area_ptr ptr, /* LINUS temporary segment pointer */ 1 89 2 lila_area_ptr ptr, /* LILA temporary segment pointer */ 1 90 2 i_o_area_ptr ptr, /* temporary segment pointer used by write, print, create_list */ 1 91 2 rel_array_ptr ptr, /* ptr to array of names rslt info structure 1 92* for current lila expression */ 1 93 2 unused_timer float bin (63), /* future expansion */ 1 94 2 request_time float bin (63), /* How much request time was spent 1 95* in LINUS. (-1 = user has just enabled 1 96* timing, do not report) */ 1 97 2 mrds_time float bin (63), /* How much time was spent in MRDS */ 1 98 2 build_increment fixed bin, /* default increment for build mode */ 1 99 2 build_start fixed bin, /* default start count for build mode */ 1 100 2 linus_version char (4), /* current version of LINUS */ 1 101 2 subsystem_control_info_ptr ptr, /* the same ptr passed by ssu_ to each request procedure */ 1 102 2 subsystem_invocation_level fixed bin, /* identifies this invocation of LINUS */ 1 103 2 selection_expression_identifier fixed bin, /* identifies the current processed selection expression */ 1 104 2 report_control_info_ptr ptr, /* pointer to linus_report_control_info structure */ 1 105 2 table_control_info_ptr ptr, /* pointer to linus_table control structure */ 1 106 2 temp_seg_info_ptr ptr, /* pointer to linus_temp_seg_mgr control structure */ 1 107 2 query_temp_segment_ptr ptr, /* points to temp seg used for manipulating query */ 1 108 2 general_work_area_ptr ptr, /* a freeing area for general use */ 1 109 2 word_pad (6) bit (36) unal, 1 110 /* procedures that will be optionally */ 1 111 /* replaced by the user. Saved so they */ 1 112 /* can be reinstated if desired. */ 1 113 2 ssu_abort_line entry options (variable), 1 114 2 ssu_post_request_line variable entry (ptr), 1 115 2 ssu_pre_request_line variable entry (ptr), 1 116 1 117 2 curr_lit_offset fixed bin (35), /* index of first free bit in lit. pool */ 1 118 2 curr_lv_val_offset fixed bin (35), /* index of first free bit lv. val. pool */ 1 119 2 static_area area (sys_info$max_seg_size - fixed (rel (addr (lcb.static_area))) + 1); 1 120 1 121 dcl lcb_ptr ptr; 1 122 1 123 /* END INCLUDE FILE linus_lcb.incl.pl1 */ 51 52 2 1 /* BEGIN INCLUDE FILE linus_ls_header.incl.pl1 -- jaw 7/28/77 */ 2 2 2 3 dcl 1 ls_header aligned based (lsh_ptr), /* header for LILA stack */ 3 1 /* BEGIN INCLUDE FILE linus_ls_common.incl.pl1 -- jaw 7/12/77 */ 3 2 3 3 2 type fixed bin, /* type of frame: 3 4* 1 => header, 3 5* 2 => set value, 3 6* 3 => lila set, 3 7* 4 => lila block */ 3 8 2 back_ptr ptr, /* pointer to previous frame */ 3 9 2 fwd_ptr ptr, /* pointer to next frame */ 3 10 3 11 /* END INCLUDE FILE linus_ls_common.incl.pl1 */ 2 4 2 5 2 cur_ptr ptr, /* pointer to current frame */ 2 6 2 src_ptr ptr, /* pointer to LILA source string */ 2 7 2 trans_failed bit (1) unal, /* on if translate failed */ 2 8 2 from_token bit (1) unal, /* on if the calling routine is linus_lila_from */ 2 9 2 reserved bit (34) unal, 2 10 2 cur_pos fixed bin (35), /* current position in source string */ 2 11 2 line_data (0 : lcb.lila_count), /* data for each source line */ 2 12 3 lno char (4), /* line number */ 2 13 3 last_char fixed bin (35); /* index of last char */ 2 14 2 15 dcl lsh_ptr ptr; 2 16 2 17 /* END INCLUDE FILE linus_ls_header.incl.pl1 */ 53 54 4 1 /* BEGIN INCLUDE FILE linus_ls_block.incl.pl1 -- jaw 8/7/78 */ 4 2 4 3 dcl 1 ls_block aligned based (lsb_ptr), /* lila stack frame for outer lila block */ 5 1 /* BEGIN INCLUDE FILE linus_ls_common.incl.pl1 -- jaw 7/12/77 */ 5 2 5 3 2 type fixed bin, /* type of frame: 5 4* 1 => header, 5 5* 2 => set value, 5 6* 3 => lila set, 5 7* 4 => lila block */ 5 8 2 back_ptr ptr, /* pointer to previous frame */ 5 9 2 fwd_ptr ptr, /* pointer to next frame */ 5 10 5 11 /* END INCLUDE FILE linus_ls_common.incl.pl1 */ 4 4 4 5 2 reserved bit (36) unal, 4 6 2 ib_level fixed bin, /* current depth of inner blocks */ 4 7 2 nrs_chars fixed bin, /* total chars. in range strings */ 4 8 2 nritems fixed bin, /* current number of range items */ 4 9 2 range_items (linus_data_$max_range_items), 4 10 3 tup_var char (32) var, /* name of linus tuple variable */ 4 11 3 mrds_var char (32) var, /* name of mrds tuple variable */ 4 12 3 rel_name char (32) var, /* name of relation */ 4 13 3 rel_index fixed bin (35), /* rel. index if temp tab */ 4 14 3 level fixed bin, /* level of block generating item */ 4 15 3 arg_ptr ptr, 4 16 3 desc_ptr ptr, 4 17 2 nselects fixed bin, /* number of select items currently defined */ 4 18 2 sel_items (mrds_data_$max_select_items) char (mrds_data_$max_token_size) var, /* the mrds select items */ 4 19 2 nprops fixed bin, /* number of operators in pred stack */ 4 20 2 pred_op_stack (linus_data_$max_pred_stack_size), 4 21 3 key fixed bin (17) unal, 4 22 3 p_cnt fixed bin (17) unal, /* current paren count */ 4 23 2 pred_pcnt fixed bin, /* current paren. count in predicate */ 4 24 2 term_op fixed bin, /* rel. op. for current term */ 4 25 2 nterms fixed bin, /* no. of terms currently in term stack */ 4 26 2 dflt_ritem fixed bin, /* index of range item to be used for default */ 4 27 2 nrange_args fixed bin, /* no. of args for temp rel indexes */ 4 28 2 rs_hd_ptr ptr, /* pointer to head of range strings */ 4 29 2 term_hd_ptr ptr, /* pointer to top item in term stack */ 4 30 2 leaf_ptr (2) ptr; /* ptr to mrds block for each leaf of current term */ 4 31 4 32 dcl lsb_ptr ptr; 4 33 4 34 /* END INCLUDE FILE linus_ls_block.incl.pl1 */ 55 56 6 1 /* BEGIN INCLUDE FILE linus_mrds_block.incl.pl1 -- jaw 7/21/77 */ 6 2 6 3 dcl 1 mrds_block aligned based (mblk_ptr), /* partial mrds selection expr */ 6 4 2 fwd_ptr ptr, /* pointer to previous item in stack */ 6 5 2 sel_offset fixed bin (35), /* offset of first select item in mrds_string */ 6 6 2 sel_length fixed bin (35), /* length of first select list in mrds string */ 6 7 2 nval_args fixed bin, /* number of value args */ 6 8 2 val_args (nval_args_init refer (mrds_block.nval_args)), 6 9 3 arg_ptr ptr, 6 10 3 desc_ptr ptr, 6 11 2 ms_len fixed bin (35), /* length of the mrds string */ 6 12 2 mrds_string char (ms_len_init refer (mrds_block.ms_len)) var; 6 13 6 14 dcl nval_args_init fixed bin; 6 15 dcl ms_len_init fixed bin (35); 6 16 dcl mblk_ptr ptr; 6 17 6 18 /* END INCLUDE FILE linus_mrds_block.incl.pl1 */ 57 58 7 1 /* BEGIN INCLUDE FILE linus_variables.incl.pl1 -- jaw 7/19/77 */ 7 2 7 3 dcl 1 variables aligned based (lv_ptr), /* info for all variables */ 7 4 2 nvars_alloc fixed bin, /* no. var. slots alloc. */ 7 5 2 nvars fixed bin, /* no. of variables currently defined */ 7 6 2 var_info (nvars_init refer (variables.nvars_alloc)), 7 7 3 name char (32), /* name of variable */ 7 8 3 var_ptr ptr, /* ptr to curr. value */ 7 9 3 bit_len fixed bin (35), /* bit length of current value */ 7 10 3 assn_type fixed bin, /* assign_ type code of current value */ 7 11 3 assn_len fixed bin (35), /* assign_ length of current value */ 7 12 3 desc bit (36); /* descrptor of current value */ 7 13 7 14 dcl lv_ptr ptr; 7 15 dcl nvars_init fixed bin; 7 16 7 17 /* END INCLUDE FILE linus_variables.incl.pl1 */ 59 60 8 1 /* BEGIN INCLUDE FILE linus_token_data.incl.pl1 -- jaw 8/7/78 */ 8 2 8 3 dcl 1 token_data aligned based (td_ptr), /* data for lila tokens */ 8 4 2 key fixed bin (17) unal, /* key of token */ 8 5 2 must_free bit (1) unal, /* on if value must be freed */ 8 6 2 temp_tab bit (1) unal, /* on if temporary table */ 8 7 2 reserved bit (16) unal, 8 8 2 mvar char (32) var, /* mrds variable if identifier */ 8 9 2 lvar char (32) var, /* linus variable if identifier */ 8 10 2 length fixed bin (35), /* char length of token value */ 8 11 2 t_ptr ptr; /* points to token value */ 8 12 8 13 dcl ((NULL init (0)), 8 14 (RP init (1)), 8 15 (COL_SPEC init (2)), 8 16 (LINUS_VAR init (3)), 8 17 (CONST init (4)), 8 18 (SET_FN init (5)), 8 19 (SCAL_FN init (6)), 8 20 (LP init (7)), 8 21 (STAR init (8)), 8 22 (DIV init (9)), 8 23 (PLUS init (10)), 8 24 (MINUS init (11)), 8 25 (TAB_NAME init (12)), 8 26 (ROW_TAB_PAIR init (13)), 8 27 (UNION init (14)), 8 28 (INTER init (15)), 8 29 (DIFFER init (16)), 8 30 (ROW_DES init (17)), 8 31 (LB init (18)), 8 32 (RB init (19)), 8 33 (SELECT init (20)), 8 34 (NOT init (21)), 8 35 (AND init (22)), 8 36 (OR init (23)), 8 37 (EQ init (24)), 8 38 (NE init (25)), 8 39 (GT init (26)), 8 40 (GE init (27)), 8 41 (LT init (28)), 8 42 (LE init (29)), 8 43 (FROM init (30)), 8 44 (WHERE init (31)), 8 45 (DUP init (32)), 8 46 (UNIQUE init (33)), 8 47 (COMMA init (34))) fixed bin int static options (constant); 8 48 8 49 dcl td_ptr ptr; 8 50 8 51 /* END INCLUDE FILE linus_token_data.incl.pl1 */ 61 62 9 1 /* BEGIN INCLUDE FILE linus_ef_data.incl.pl1 -- jaw 7/21/77 */ 9 2 9 3 dcl 1 ef_data aligned based (ed_ptr), /* structure for passing expr. and fun. data among programs */ 9 4 2 var_name char (32), /* name of tuple variable */ 9 5 2 bit_length fixed bin (35), /* bit length of result */ 9 6 2 desc bit (36), /* descriptor of result */ 9 7 2 assn_ptr ptr, /* pointer to result value */ 9 8 2 assn_type fixed bin, /* assign_ type code of result */ 9 9 2 assn_len fixed bin (35), /* assign_ length */ 9 10 2 nmrds_items fixed bin, /* number of mrds items returned */ 9 11 2 mrds_items (linus_data_$max_expr_items), /* previously unselected mrds items referenced 9 12* in the expression */ 9 13 3 attr_name char (32), /* name of attribute */ 9 14 3 domain_name char (32), /* domain of attribute */ 9 15 3 bit_length fixed bin (35), /* attrib. bit length */ 9 16 3 desc bit (36), /* attrib. descriptor */ 9 17 3 assn_ptr ptr, /* pointer to receiving field of attr. */ 9 18 3 assn_type fixed bin, /* assign_ type code of attr */ 9 19 3 assn_len fixed bin (35), /* assign_ length for attr. */ 9 20 2 ef_ptr ptr; /* pointer to expr. status */ 9 21 9 22 dcl ed_ptr ptr; 9 23 9 24 /* END INCLUDE FILE linus_ef_data.incl.pl1 */ 63 64 10 1 /* BEGIN INCLUDE FILE linus_set_fn.incl.pl1 -- jaw 7/13/77 10 2* 10 3* 81-10-26 Rickie E. Brinegar: Modified to have entry variables instead of 10 4* entry pointers. This change included the addition of bit switches inorder 10 5* to be able to tell if the entry variable had been set yet. Also changed 10 6* the name of the structure from set_fn to linus_set_fn and the name of the 10 7* variable that it was based on from setf_ptr to linus_set_fn_ptr. 10 8* 10 9* 81-11-05 Rickie E. Brinegar: Changed the entry pointers to entry variables 10 10* and added bit switches to determine when the entries have or have not been 10 11* set. Renamed set_fn sturcture to linus_set_fn, setf_ptr to 10 12* linus_set_fn_ptr, and nset_fn_init_args to 10 13* initial_number_of_linus_set_fn_args. 10 14* 10 15**/ 10 16 10 17 dcl 1 linus_set_fn aligned based (linus_set_fn_ptr), /* internal rep. of set fun. */ 10 18 2 fwd_ptr ptr, /* pointer to next set function to be eval. 10 19* at this level */ 10 20 2 prior_ptr ptr, /* pointer to head of list of set functions 10 21* to be evaluated prior to this one */ 10 22 2 assign_entry entry variable, /* pointer to assign entry */ 10 23 2 calc_entry entry variable, /* pointer to calc entry */ 10 24 2 init_entry entry variable, /* pointer to initialization entry */ 10 25 2 assign_al_ptr ptr, /* pointer to assign entry arg list */ 10 26 2 calc_al_ptr ptr, /* pointer to calc entry arg list */ 10 27 2 rtrv_al_ptr ptr, /* pointer to arg list for dsl_$retrieve */ 10 28 2 flags, 10 29 3 assign_entry_set bit (1) unaligned, /* 0 => null, 1 => not null */ 10 30 3 calc_entry_set bit (1) unaligned, /* 0 => null, 1 => not null */ 10 31 3 init_entry_set bit (1) unaligned, /* 0 => null, 1 => not null */ 10 32 3 pad_bits bit (33) unaligned, 10 33 2 rslt_desc bit (36), /* descriptor for result */ 10 34 2 nargs fixed bin, /* number of input args to calc entry */ 10 35 2 arg (initial_number_of_linus_set_fn_args refer (linus_set_fn.nargs)), 10 36 3 type fixed bin (4) unal, /* 1 => constant 10 37* 2 => linus variable 10 38* 3 => scalar function 10 39* 4 => set function 10 40* 5 => expression 10 41* 6 => data base item */ 10 42 3 must_convert bit (1) unal, /* on if must convert prior to call */ 10 43 3 reserved bit (30) unal, 10 44 3 desc bit (36), /* descriptor of source data */ 10 45 3 assn_ptr ptr, /* assign_ ptr for source data */ 10 46 3 assn_type fixed bin, /* assign_ type for source data */ 10 47 3 assn_len fixed bin (35), /* assign_ length for source data */ 10 48 3 arg_desc bit (36), /* descriptor for converted arg */ 10 49 3 arg_assn_ptr ptr, /* assign_ ptr for converted arg */ 10 50 3 arg_assn_type fixed bin, /* assign_ type code for converted arg */ 10 51 3 arg_assn_len fixed bin (35), /* assign_ length for converted arg */ 10 52 3 ef_ptr ptr; /* pointer to express. or function structure */ 10 53 10 54 dcl initial_number_of_linus_set_fn_args fixed bin; 10 55 dcl linus_set_fn_ptr ptr; 10 56 10 57 /* END INCLUDE FILE linus_set_fn.incl.pl1 */ 65 66 11 1 /* BEGIN mdbm_descriptor.incl.pl1 -- jaw 5/31/78 */ 11 2 /* modified by Jim Gray - - Nov. 1979, to change type from fixed bin(5) to 11 3* unsigned fixed bin(6), so new packed decimal data types could be handled. 11 4* also the duplicate mrds_descriptor.incl.pl1 was eliminated. */ 11 5 11 6 dcl 1 descriptor based (desc_ptr), /* map of Multics descriptor */ 11 7 2 version bit (1) unal, /* DBM handles vers. 1 only */ 11 8 2 type unsigned fixed bin (6) unal, /* data type */ 11 9 2 packed bit (1) unal, /* on if data item is packed */ 11 10 2 number_dims bit (4) unal, /* dimensions */ 11 11 2 size, /* size for string data */ 11 12 3 scale bit (12) unal, /* scale for num. data */ 11 13 3 precision bit (12) unal, /* prec. for num. data */ 11 14 2 array_info (num_dims), 11 15 3 lower_bound fixed bin (35), /* lower bound of dimension */ 11 16 3 upper_bound fixed bin (35), /* upper bound of dimension */ 11 17 3 multiplier fixed bin (35); /* element separation */ 11 18 11 19 dcl desc_ptr ptr; 11 20 dcl num_dims fixed bin init (0) ; /* more useful form of number_dims */ 11 21 11 22 /* END mdbm_descriptor.incl.pl1 */ 11 23 11 24 67 68 69 dcl ( 70 code, /* Output: status code */ 71 icode 72 ) fixed bin (35); /* internal status code */ 73 dcl ( 74 nops, /* curr. no. of stacked arith ops. */ 75 nitems, /* curr. no. of stacked operands */ 76 local_pcnt, /* to keep paren count for this expr. */ 77 i 78 ) fixed bin; /* internal index */ 79 dcl ( 80 done, /* completion flag */ 81 expr_flag, /* on if expr. allowed */ 82 atom_flag, /* on if atom allowed */ 83 aop_flag, /* on if arith op allowed */ 84 lp_flag, /* on if ( allowed */ 85 rp_flag, /* on if ) allowed */ 86 end_flag 87 ) bit (1) unal; /* on if end of expr. allowed */ 88 dcl ( 89 ex_ptr, /* Output: pointer to mrds_block for expr. */ 90 exp_hd_ptr, 91 lss_ptr /* pointer to ls_set structure */ 92 ) ptr; /* ptr to top of operand stack */ 93 dcl ex_var char (*); /* var name for expr. */ 94 dcl ( 95 variable, /* variable name */ 96 master_var 97 ) char (32); /* master variable for comparison */ 98 dcl work_area area (sys_info$max_seg_size) based (lcb.lila_area_ptr); 99 dcl token char (token_data.length) based (token_data.t_ptr); 100 dcl 1 expr_data aligned like ef_data; 101 dcl 1 op_stack (linus_data_$max_expr_items) aligned, /* operator stack */ 102 2 p_cnt fixed bin (17) unal, 103 2 key fixed bin (17) unal; 104 105 dcl ( 106 PAREN init (1), 107 END init (2), 108 OP init (3) 109 ) int static fixed bin options (constant); 110 dcl op_prec (8:11) fixed bin (8) unal int static options (constant) 111 init (2, 2, 1, 1); 112 dcl mrds_op (8:11) char (3) int static options (constant) 113 init (" * ", " / ", " + ", " - "); 114 115 dcl ( 116 linus_data_$max_expr_items, 117 linus_data_$max_range_items, 118 linus_data_$max_pred_stack_size, 119 linus_error_$inv_expr, 120 linus_error_$unbal_parens, 121 linus_error_$expr_str, 122 linus_error_$expr_ovfl, 123 linus_error_$inv_tup_var, 124 linus_error_$const_expr_fn, 125 mrds_data_$max_select_items, 126 mrds_data_$max_token_size, 127 sys_info$max_seg_size 128 ) fixed bin (35) ext; 129 130 dcl (addr, addrel, fixed, length, null, rel, substr) builtin; 131 132 dcl linus_lila_get_token entry (ptr, ptr, fixed bin (35), ptr, fixed bin (35)); 133 dcl linus_lila_error entry (ptr, ptr, fixed bin (35), char (*)); 134 dcl linus_lila_set_fn entry (ptr, ptr, ptr, ptr, fixed bin (35)); 135 dcl linus_lila_build_scfn_str 136 entry (ptr, ptr, ptr, ptr, char (*), fixed bin (35)); 137 138 mblk_ptr, /* initialize */ 139 exp_hd_ptr = null; 140 nops, num_dims, local_pcnt, nitems = 0; 141 master_var = ""; 142 lsb_ptr = ls_header.cur_ptr; 143 lss_ptr = ls_block.back_ptr; 144 145 expr_flag, /* set state flags */ 146 lp_flag = "1"b; 147 aop_flag, rp_flag, atom_flag, end_flag = "0"b; 148 149 done = "0"b; /* init loop control flag */ 150 do while (^done); /* main processing loop */ 151 152 if token_data.key = NULL then do; /* if need to get new token */ 153 call 154 linus_lila_get_token (lcb_ptr, lsh_ptr, ls_header.cur_pos, 155 td_ptr, icode); 156 if icode ^= 0 then 157 call linus_lila_error (lcb_ptr, lsh_ptr, icode, token); 158 end; 159 160 go to token_proc (token_data.key); 161 162 token_proc (0): /* null */ 163 token_proc (12): /* table name */ 164 token_proc (13): /* row table pair */ 165 token_proc (14): /* union */ 166 token_proc (15): /* inter */ 167 token_proc (16): /* differ */ 168 token_proc (17): /* row designator */ 169 token_proc (18): /* { */ 170 token_proc (19): /* } */ 171 token_proc (20): /* select */ 172 token_proc (21): /* ^ */ 173 token_proc (22): /* & */ 174 token_proc (23): /* | */ 175 token_proc (24): /* = */ 176 token_proc (25): /* ^= */ 177 token_proc (26): /* > */ 178 token_proc (27): /* >= */ 179 token_proc (28): /* < */ 180 token_proc (29): /* <= */ 181 token_proc (30): /* from */ 182 token_proc (31): /* where */ 183 token_proc (32): /* dup */ 184 token_proc (33): /* unique */ 185 token_proc (34): /* , */ 186 if ^end_flag then /* if cant end yet */ 187 call 188 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$inv_expr, 189 token); 190 call finish; /* finish up expr. and put in mrds_block */ 191 done = "1"b; 192 go to next; 193 194 token_proc (1): /* ) */ 195 if ^rp_flag then /* if not expected */ 196 call 197 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$inv_expr, 198 token); 199 if ls_block.pred_pcnt <= 0 then /* no matching ( */ 200 call 201 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$unbal_parens, 202 token); 203 if local_pcnt <= 0 then /* if paren belongs to higher level */ 204 if end_flag then do; /* if we can end here */ 205 call finish; 206 done = "1"b; 207 end; 208 else call 209 linus_lila_error (lcb_ptr, lsh_ptr, 210 linus_error_$unbal_parens, token); 211 else do; /* if valid paren. */ 212 call reduce (PAREN); /* perform any nec. stack reduction */ 213 ls_block.pred_pcnt = ls_block.pred_pcnt - 1; /* decr. par. count */ 214 local_pcnt = local_pcnt - 1; 215 rp_flag, /* reset state flags */ 216 end_flag, aop_flag = "1"b; 217 expr_flag, atom_flag, lp_flag = "0"b; 218 token_data.key = NULL; /* force new token */ 219 end; /* if valid paren */ 220 go to next; 221 222 token_proc (2): /* column spec. */ 223 if ^atom_flag & ^expr_flag then /* is not expected */ 224 call 225 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$inv_expr, 226 token); 227 call check_var ((token_data.mvar)); /* make sure we have no more than one var. */ 228 call set_ord_block (token_data.mvar || "." || token); 229 /* make a mrds block and stack it */ 230 if expr_flag then 231 end_flag = "0"b; /* cant have end with only one operand */ 232 else end_flag = "1"b; 233 atom_flag, /* reset other state flags */ 234 expr_flag, lp_flag = "0"b; 235 aop_flag, rp_flag = "1"b; 236 token_data.key = NULL; 237 go to next; 238 239 token_proc (3): /* linus variable */ 240 if ^atom_flag then /* if not expected */ 241 call 242 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$inv_expr, 243 token); 244 lv_ptr = lcb.lv_ptr; /* look for info on curr. value */ 245 do i = 1 to variables.nvars 246 while (token ^= variables.var_info.name (i)); 247 end; /* guaranteed to find it */ 248 call 249 set_val_block (variables.var_info.var_ptr (i), 250 addr (variables.var_info.desc (i))); /* make and stack mrds block */ 251 token_data.key = NULL; /* force new token */ 252 expr_flag, atom_flag, lp_flag = "0"b; 253 end_flag, rp_flag, aop_flag = "1"b; 254 go to next; 255 256 /* **** 11/2/81 DJ Schimke: BEGIN CHANGE *************************************/ 257 token_proc (4): /* constant */ 258 if ^atom_flag & ^expr_flag then /* if not expected */ 259 call 260 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$inv_expr, 261 token); 262 263 /* **** 11/2/81 DJ Schimke: END CHANGE ***************************************/ 264 if substr (token, 1, 1) = """" /* if is string constant */ 265 | substr (token, 1, 1) = "(" then 266 call 267 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$expr_str, 268 token); 269 call set_ord_block (token); /* make and stack mrds block */ 270 token_data.key = NULL; /* force new token */ 271 expr_flag, /* reset state flags */ 272 atom_flag, lp_flag = "0"b; 273 end_flag, rp_flag, aop_flag = "1"b; 274 go to next; 275 276 token_proc (5): /* set function */ 277 if ^atom_flag then /* if not expected */ 278 call 279 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$inv_expr, 280 token); 281 call 282 linus_lila_set_fn (lcb_ptr, lsh_ptr, td_ptr, addr (expr_data), 283 icode); /* process the set fn. */ 284 if icode ^= 0 then 285 call linus_lila_error (lcb_ptr, lsh_ptr, icode, token); 286 call 287 set_val_block (expr_data.assn_ptr, 288 addr (expr_data.ef_ptr -> linus_set_fn.rslt_desc)); 289 /* make and stack mrds block */ 290 atom_flag, /* reset state flags */ 291 expr_flag, lp_flag = "0"b; 292 rp_flag, aop_flag, end_flag = "1"b; 293 go to next; 294 295 token_proc (6): /* scalar function */ 296 if ^expr_flag & ^atom_flag then /* if not expected */ 297 call 298 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$inv_expr, 299 token); 300 variable = ""; 301 call 302 linus_lila_build_scfn_str (lcb_ptr, lsh_ptr, td_ptr, mblk_ptr, 303 variable, icode); /* make mrds string */ 304 if icode ^= 0 then 305 call linus_lila_error (lcb_ptr, lsh_ptr, icode, token); 306 call check_var (variable); /* ensure consistency */ 307 mrds_block.fwd_ptr = exp_hd_ptr; /* chain into operand stack */ 308 exp_hd_ptr = mblk_ptr; 309 mblk_ptr = null; 310 nitems = nitems + 1; 311 expr_flag, /* reset state flags, allow end if scal_fn only operand */ 312 atom_flag, lp_flag = "0"b; 313 end_flag, rp_flag, aop_flag = "1"b; 314 go to next; 315 316 token_proc (7): /* ( */ 317 if ^lp_flag then /* if not expected */ 318 call 319 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$inv_expr, 320 token); 321 ls_block.pred_pcnt = ls_block.pred_pcnt + 1; /* merely incr. count */ 322 local_pcnt = local_pcnt + 1; 323 token_data.key = NULL; /* force new token, leave state flags as they are */ 324 go to next; 325 326 token_proc (8): /* * */ 327 token_proc (9): /* / */ 328 token_proc (10): /* + */ 329 token_proc (11): /* - */ 330 if ^aop_flag then /* if not expected */ 331 call 332 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$inv_expr, 333 token); 334 if nops > 0 then /* see if need to reduce for lower prec. op */ 335 if op_stack.p_cnt (nops) = ls_block.pred_pcnt then 336 if op_prec (token_data.key) <= op_prec (op_stack.key (nops)) 337 then call reduce (OP); 338 if nops >= linus_data_$max_expr_items then /* if overflow */ 339 call 340 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$expr_ovfl, "") 341 ; 342 nops = nops + 1; /* stack the operator */ 343 op_stack.key (nops) = token_data.key; 344 op_stack.p_cnt (nops) = ls_block.pred_pcnt; 345 token_data.key = NULL; /* force new token */ 346 expr_flag, /* reset state flags */ 347 end_flag, aop_flag, rp_flag = "0"b; 348 atom_flag, lp_flag = "1"b; 349 go to next; 350 351 next: 352 end; /* main processing loop */ 353 354 ex_var = master_var; /* pass info to caller */ 355 ex_ptr = exp_hd_ptr; 356 code = 0; 357 return; 358 359 reduce: 360 proc (type); 361 362 /* Procedure to reduce items in expr. stacks. Three types of reduction are 363* provided: (a) for lower prec. operator, (b) for right parenthesis, and (c) final 364* reduction. */ 365 366 dcl type fixed bin; 367 dcl done bit (1) init ("0"b); 368 369 if type = END then 370 do while (nops > 0 & nitems > 1); 371 call combine; /* reduce entire stack */ 372 end; 373 374 /* 81-11-02 DJ Schimke: BEGIN CHANGE ************************************** */ 375 /* done flag prevents stringrange when nops = 0 */ 376 377 else if type = PAREN then 378 do while (nops > 0 & nitems > 1 & ^done); 379 if op_stack.p_cnt (nops) = ls_block.pred_pcnt then 380 call combine; /* reduce within paren. */ 381 else done = "1"b; 382 end; 383 else 384 do while (nops > 0 & nitems > 1 & ^done); 385 if op_stack.p_cnt (nops) = ls_block.pred_pcnt 386 & op_prec (token_data.key) <= op_prec (op_stack.key (nops)) then 387 call combine; /* reduce for lower prec. oper. */ 388 else done = "1"b; 389 end; 390 391 /* 81-11-02 DJ Schimke: END CHANGE ************************************** */ 392 393 combine: 394 proc; 395 396 /* procedure to combine top two operands and top operator into one mrds 397* block, and replace them in the stack. */ 398 399 dcl (b1p, b2p) ptr; 400 dcl i fixed bin; 401 402 b2p = exp_hd_ptr; /* top operand */ 403 b1p = b2p -> mrds_block.fwd_ptr; /* prev. operand */ 404 ms_len_init = 5 + length (b1p -> mrds_block.mrds_string) 405 /* set up and fill in mrds block for combination */ 406 + length (b2p -> mrds_block.mrds_string); 407 nval_args_init = 408 b1p -> mrds_block.nval_args + b2p -> mrds_block.nval_args; 409 allocate mrds_block in (work_area); 410 mrds_block.fwd_ptr = b1p -> mrds_block.fwd_ptr; /* replace top two terms */ 411 mrds_block.mrds_string = 412 "(" || b1p -> mrds_block.mrds_string 413 || mrds_op (op_stack.key (nops)) || b2p -> mrds_block.mrds_string 414 || ")"; 415 do i = 1 to b1p -> mrds_block.nval_args; /* args from first operand */ 416 mrds_block.val_args.arg_ptr (i) = 417 b1p -> mrds_block.val_args.arg_ptr (i); 418 mrds_block.val_args.desc_ptr (i) = 419 b2p -> mrds_block.val_args.desc_ptr (i); 420 end; 421 do i = b1p -> mrds_block.nval_args + 1 to mrds_block.nval_args; 422 /* args from second operand */ 423 mrds_block.val_args.arg_ptr (i) = 424 b2p 425 -> mrds_block.val_args.arg_ptr (i - b1p -> mrds_block.nval_args); 426 mrds_block.val_args.desc_ptr (i) = 427 b2p 428 -> mrds_block.val_args.desc_ptr (i - b1p -> mrds_block.nval_args); 429 end; 430 nops = nops - 1; /* reset counts */ 431 nitems = nitems - 1; 432 exp_hd_ptr = mblk_ptr; /* chain in new operand */ 433 mblk_ptr = null; 434 b1p = null; 435 b2p = null; 436 437 end combine; 438 439 end reduce; 440 441 check_var: 442 proc (var); 443 444 /* Procedure to ensure that expr. uses only one tuple variable */ 445 446 dcl var char (*); 447 448 if var = "" then 449 call 450 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$const_expr_fn, 451 ""); 452 if master_var = "" then /* if first time */ 453 master_var = var; 454 else if var ^= master_var then /* not same */ 455 call 456 linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$inv_tup_var, var) 457 ; 458 459 end check_var; 460 461 set_ord_block: 462 proc (str); 463 464 /* procedure to fill in a mrds block for operand with no values */ 465 466 dcl str char (*); 467 468 ms_len_init = length (str); 469 nval_args_init = 0; 470 allocate mrds_block in (work_area); 471 mrds_block.fwd_ptr = exp_hd_ptr; 472 mrds_block.mrds_string = str; 473 exp_hd_ptr = mblk_ptr; 474 mblk_ptr = null; 475 nitems = nitems + 1; 476 if token_data.must_free then 477 token_data.t_ptr = null; 478 479 end set_ord_block; 480 481 set_val_block: 482 proc (arg_ptr, desc_ptr); 483 484 /* Procedure to fill in and stack a mrds block for an operand with one value */ 485 486 dcl (arg_ptr, desc_ptr) ptr; 487 dcl is_var (22) bit (1) int static unal options (constant) 488 init ((19) (1)"0"b, "1"b, "0"b, "1"b); 489 490 ms_len_init = 3; 491 nval_args_init = 1; 492 allocate mrds_block in (work_area); 493 mrds_block.fwd_ptr = exp_hd_ptr; 494 mrds_block.mrds_string = ".V."; 495 if is_var (desc_ptr -> descriptor.type) then 496 mrds_block.val_args.arg_ptr (1) = addrel (arg_ptr, 1); 497 else mrds_block.val_args.arg_ptr (1) = arg_ptr; 498 mrds_block.val_args.desc_ptr (1) = desc_ptr; 499 exp_hd_ptr = mblk_ptr; 500 mblk_ptr = null; 501 nitems = nitems + 1; 502 503 end set_val_block; 504 505 finish: 506 proc; 507 508 /* Procedure to put finishing touches on the mrds expr. */ 509 510 dcl bp ptr; 511 512 call reduce (END); /* do final reduction */ 513 if nops ^= 0 | nitems ^= 1 then /* didnt work out */ 514 call linus_lila_error (lcb_ptr, lsh_ptr, linus_error_$inv_expr, ""); 515 bp = exp_hd_ptr; 516 if substr (bp -> mrds_block.mrds_string, 1, 1) = "(" then do; 517 /* can replace outer () with [] */ 518 substr (bp -> mrds_block.mrds_string, 1, 1) = "["; 519 substr (bp -> mrds_block.mrds_string, 520 length (bp -> mrds_block.mrds_string), 1) = "]"; 521 end; /* if mere replacement */ 522 else do; /* no outer (), must reallocate */ 523 ms_len_init = length (bp -> mrds_block.mrds_string) + 2; 524 nval_args_init = bp -> mrds_block.nval_args; 525 allocate mrds_block in (work_area); 526 mrds_block.fwd_ptr = bp -> mrds_block.fwd_ptr; 527 mrds_block.val_args = bp -> mrds_block.val_args; 528 mrds_block.mrds_string = "[" || bp -> mrds_block.mrds_string || "]"; 529 exp_hd_ptr = mblk_ptr; 530 mblk_ptr = null; 531 end; /* if had to reallocate */ 532 533 end finish; 534 535 end linus_lila_build_expr_str; SOURCE FILES USED IN THIS COMPILATION. LINE NUMBER DATE MODIFIED NAME PATHNAME 0 07/29/86 0939.8 linus_lila_build_expr_str.pl1 >special_ldd>install>MR12.0-1106>linus_lila_build_expr_str.pl1 51 1 07/29/86 0937.8 linus_lcb.incl.pl1 >special_ldd>install>MR12.0-1106>linus_lcb.incl.pl1 53 2 11/23/82 1327.2 linus_ls_header.incl.pl1 >ldd>include>linus_ls_header.incl.pl1 2-4 3 03/27/82 0434.5 linus_ls_common.incl.pl1 >ldd>include>linus_ls_common.incl.pl1 55 4 03/27/82 0434.5 linus_ls_block.incl.pl1 >ldd>include>linus_ls_block.incl.pl1 4-4 5 03/27/82 0434.5 linus_ls_common.incl.pl1 >ldd>include>linus_ls_common.incl.pl1 57 6 03/27/82 0434.5 linus_mrds_block.incl.pl1 >ldd>include>linus_mrds_block.incl.pl1 59 7 03/27/82 0434.5 linus_variables.incl.pl1 >ldd>include>linus_variables.incl.pl1 61 8 03/27/82 0434.5 linus_token_data.incl.pl1 >ldd>include>linus_token_data.incl.pl1 63 9 03/27/82 0434.5 linus_ef_data.incl.pl1 >ldd>include>linus_ef_data.incl.pl1 65 10 11/23/82 1327.2 linus_set_fn.incl.pl1 >ldd>include>linus_set_fn.incl.pl1 67 11 10/14/83 1608.6 mdbm_descriptor.incl.pl1 >ldd>include>mdbm_descriptor.incl.pl1 NAMES DECLARED IN THIS COMPILATION. IDENTIFIER OFFSET LOC STORAGE CLASS DATA TYPE ATTRIBUTES AND REFERENCES (* indicates a set context) NAMES DECLARED BY DECLARE STATEMENT. END constant fixed bin(17,0) initial dcl 105 set ref 369 512* NULL constant fixed bin(17,0) initial dcl 8-13 ref 152 218 236 251 270 323 345 OP constant fixed bin(17,0) initial dcl 105 set ref 334* PAREN constant fixed bin(17,0) initial dcl 105 set ref 212* 377 addr builtin function dcl 130 ref 248 248 281 281 286 286 addrel builtin function dcl 130 ref 495 aop_flag 000121 automatic bit(1) unaligned dcl 79 set ref 147* 215* 235* 253* 273* 292* 313* 326 346* arg_ptr 6 based pointer array level 3 in structure "mrds_block" dcl 6-3 in procedure "linus_lila_build_expr_str" set ref 416* 416 423* 423 495* 497* arg_ptr parameter pointer dcl 486 in procedure "set_val_block" ref 481 495 497 assn_ptr 12 000152 automatic pointer level 2 dcl 100 set ref 286* atom_flag 000120 automatic bit(1) unaligned dcl 79 set ref 147* 217* 222 233* 239 252* 257 271* 276 290* 295 311* 348* b1p 000200 automatic pointer dcl 399 set ref 403* 404 407 410 411 415 416 421 423 426 434* b2p 000202 automatic pointer dcl 399 set ref 402* 403 404 407 411 418 423 426 435* back_ptr 2 based pointer level 2 dcl 4-3 ref 143 bp 000224 automatic pointer dcl 510 set ref 515* 516 518 519 519 523 524 526 527 528 code parameter fixed bin(35,0) dcl 69 set ref 19 356* cur_pos 13 based fixed bin(35,0) level 2 dcl 2-3 set ref 153* cur_ptr 6 based pointer level 2 dcl 2-3 ref 142 desc 17 based bit(36) array level 3 dcl 7-3 set ref 248 248 desc_ptr parameter pointer dcl 486 in procedure "set_val_block" ref 481 495 498 desc_ptr 10 based pointer array level 3 in structure "mrds_block" dcl 6-3 in procedure "linus_lila_build_expr_str" set ref 418* 418 426* 426 498* descriptor based structure level 1 unaligned dcl 11-6 done 000170 automatic bit(1) initial unaligned dcl 367 in procedure "reduce" set ref 367* 377 381* 383 388* done 000116 automatic bit(1) unaligned dcl 79 in procedure "linus_lila_build_expr_str" set ref 149* 150 191* 206* ef_data based structure level 1 dcl 9-3 ef_ptr 000152 automatic pointer level 2 dcl 100 set ref 286 286 end_flag 000124 automatic bit(1) unaligned dcl 79 set ref 147* 162 203 215* 230* 232* 253* 273* 292* 313* 346* ex_ptr parameter pointer dcl 88 set ref 19 355* ex_var parameter char unaligned dcl 93 set ref 19 354* exp_hd_ptr 000126 automatic pointer dcl 88 set ref 138* 307 308* 355 402 432* 471 473* 493 499* 515 529* expr_data 000152 automatic structure level 1 dcl 100 set ref 281 281 expr_flag 000117 automatic bit(1) unaligned dcl 79 set ref 145* 217* 222 230 233* 252* 257 271* 290* 295 311* 346* fwd_ptr based pointer level 2 dcl 6-3 set ref 307* 403 410* 410 471* 493* 526* 526 i 000115 automatic fixed bin(17,0) dcl 73 in procedure "linus_lila_build_expr_str" set ref 245* 245* 248 248 248 i 000204 automatic fixed bin(17,0) dcl 400 in procedure "combine" set ref 415* 416 416 418 418* 421* 423 423 426 426* icode 000111 automatic fixed bin(35,0) dcl 69 set ref 153* 156 156* 281* 284 284* 301* 304 304* is_var 000043 constant bit(1) initial array unaligned dcl 487 ref 495 key based fixed bin(17,0) level 2 in structure "token_data" packed unaligned dcl 8-3 in procedure "linus_lila_build_expr_str" set ref 152 160 218* 236* 251* 270* 323* 334 343 345* 385 key 0(18) 000152 automatic fixed bin(17,0) array level 2 in structure "op_stack" packed unaligned dcl 101 in procedure "linus_lila_build_expr_str" set ref 334 343* 385 411 lcb based structure level 1 dcl 1-53 lcb_ptr parameter pointer dcl 1-121 set ref 19 153* 156* 162* 194* 199* 208* 222* 239* 244 257* 264* 276* 281* 284* 295* 301* 304* 316* 326* 338* 409 448* 454* 470 492 513* 525 length builtin function dcl 130 in procedure "linus_lila_build_expr_str" ref 404 404 468 519 523 length 23 based fixed bin(35,0) level 2 in structure "token_data" dcl 8-3 in procedure "linus_lila_build_expr_str" ref 156 156 162 162 194 194 199 199 208 208 222 222 228 239 239 245 257 257 264 264 264 264 269 269 276 276 284 284 295 295 304 304 316 316 326 326 lila_area_ptr 62 based pointer level 2 dcl 1-53 ref 409 470 492 525 linus_data_$max_expr_items 000010 external static fixed bin(35,0) dcl 115 ref 100 101 338 linus_data_$max_pred_stack_size 000014 external static fixed bin(35,0) dcl 115 ref 199 213 213 321 321 334 344 379 385 linus_data_$max_range_items 000012 external static fixed bin(35,0) dcl 115 ref 199 213 213 321 321 334 344 379 385 linus_error_$const_expr_fn 000030 external static fixed bin(35,0) dcl 115 set ref 448* linus_error_$expr_ovfl 000024 external static fixed bin(35,0) dcl 115 set ref 338* linus_error_$expr_str 000022 external static fixed bin(35,0) dcl 115 set ref 264* linus_error_$inv_expr 000016 external static fixed bin(35,0) dcl 115 set ref 162* 194* 222* 239* 257* 276* 295* 316* 326* 513* linus_error_$inv_tup_var 000026 external static fixed bin(35,0) dcl 115 set ref 454* linus_error_$unbal_parens 000020 external static fixed bin(35,0) dcl 115 set ref 199* 208* linus_lila_build_scfn_str 000044 constant entry external dcl 135 ref 301 linus_lila_error 000040 constant entry external dcl 133 ref 156 162 194 199 208 222 239 257 264 276 284 295 304 316 326 338 448 454 513 linus_lila_get_token 000036 constant entry external dcl 132 ref 153 linus_lila_set_fn 000042 constant entry external dcl 134 ref 281 linus_set_fn based structure level 1 dcl 10-17 local_pcnt 000114 automatic fixed bin(17,0) dcl 73 set ref 140* 203 214* 214 322* 322 lp_flag 000122 automatic bit(1) unaligned dcl 79 set ref 145* 217* 233* 252* 271* 290* 311* 316 348* ls_block based structure level 1 dcl 4-3 ls_header based structure level 1 dcl 2-3 lsb_ptr 000100 automatic pointer dcl 4-32 set ref 142* 143 199 213 213 321 321 334 344 379 385 lsh_ptr parameter pointer dcl 2-15 set ref 19 142 153* 153 156* 162* 194* 199* 208* 222* 239* 257* 264* 276* 281* 284* 295* 301* 304* 316* 326* 338* 448* 454* 513* lss_ptr 000130 automatic pointer dcl 88 set ref 143* lv_ptr 000106 automatic pointer dcl 7-14 in procedure "linus_lila_build_expr_str" set ref 244* 245 245 248 248 248 lv_ptr 32 based pointer level 2 in structure "lcb" dcl 1-53 in procedure "linus_lila_build_expr_str" ref 244 master_var 000142 automatic char(32) unaligned dcl 94 set ref 141* 354 452 452* 454 mblk_ptr 000104 automatic pointer dcl 6-16 set ref 138* 301* 307 308 309* 409* 410 411 416 418 421 423 426 432 433* 470* 471 472 473 474* 492* 493 494 495 497 498 499 500* 525* 526 527 528 529 530* mrds_block based structure level 1 dcl 6-3 set ref 409 470 492 525 mrds_data_$max_select_items 000032 external static fixed bin(35,0) dcl 115 ref 199 213 213 321 321 334 344 379 385 mrds_data_$max_token_size 000034 external static fixed bin(35,0) dcl 115 ref 199 213 213 321 321 334 344 379 385 mrds_op 000044 constant char(3) initial array unaligned dcl 112 ref 411 mrds_string based varying char level 2 dcl 6-3 set ref 404 404 411* 411 411 472* 494* 516 518* 519 519* 523 528* 528 ms_len based fixed bin(35,0) level 2 dcl 6-3 set ref 409* 411 470* 472 492* 494 525* 528 ms_len_init 000103 automatic fixed bin(35,0) dcl 6-15 set ref 404* 409 409 468* 470 470 490* 492 492 523* 525 525 must_free 0(18) based bit(1) level 2 packed unaligned dcl 8-3 ref 476 mvar 1 based varying char(32) level 2 dcl 8-3 ref 227 228 name 2 based char(32) array level 3 dcl 7-3 ref 245 nitems 000113 automatic fixed bin(17,0) dcl 73 set ref 140* 310* 310 369 377 383 431* 431 475* 475 501* 501 513 nops 000112 automatic fixed bin(17,0) dcl 73 set ref 140* 334 334 334 338 342* 342 343 344 369 377 379 383 385 385 411 430* 430 513 null builtin function dcl 130 ref 138 309 433 434 435 474 476 500 530 num_dims 000110 automatic fixed bin(17,0) initial dcl 11-20 set ref 140* 11-20* nval_args 4 based fixed bin(17,0) level 2 dcl 6-3 set ref 404 404 407 407 409* 409 411 411 411 411 415 421 421 423 426 470* 470 472 472 492* 492 494 494 516 518 519 519 523 524 525* 525 527 528 528 528 nval_args_init 000102 automatic fixed bin(17,0) dcl 6-14 set ref 407* 409 409 469* 470 470 491* 492 492 524* 525 525 nvars 1 based fixed bin(17,0) level 2 dcl 7-3 ref 245 op_prec 000047 constant fixed bin(8,0) initial array unaligned dcl 110 ref 334 334 385 385 op_stack 000152 automatic structure array level 1 dcl 101 p_cnt 000152 automatic fixed bin(17,0) array level 2 packed unaligned dcl 101 set ref 334 344* 379 385 pred_pcnt based fixed bin(17,0) level 2 dcl 4-3 set ref 199 213* 213 321* 321 334 344 379 385 rp_flag 000123 automatic bit(1) unaligned dcl 79 set ref 147* 194 215* 235* 253* 273* 292* 313* 346* rslt_desc 27 based bit(36) level 2 dcl 10-17 set ref 286 286 str parameter char unaligned dcl 466 ref 461 468 472 substr builtin function dcl 130 set ref 264 264 516 518* 519* t_ptr 24 based pointer level 2 dcl 8-3 set ref 156 162 194 199 208 222 228 239 245 257 264 264 264 269 276 284 295 304 316 326 476* td_ptr parameter pointer dcl 8-49 set ref 19 152 153* 156 156 156 160 162 162 162 194 194 194 199 199 199 208 208 208 218 222 222 222 227 228 228 228 236 239 239 239 245 245 251 257 257 257 264 264 264 264 264 264 264 269 269 269 270 276 276 276 281* 284 284 284 295 295 295 301* 304 304 304 316 316 316 323 326 326 326 334 343 345 385 476 476 token based char unaligned dcl 99 set ref 156* 162* 194* 199* 208* 222* 228 239* 245 257* 264 264 264* 269* 276* 284* 295* 304* 316* 326* token_data based structure level 1 dcl 8-3 type parameter fixed bin(17,0) dcl 366 in procedure "reduce" ref 359 369 377 type 0(01) based fixed bin(6,0) level 2 in structure "descriptor" packed unsigned unaligned dcl 11-6 in procedure "linus_lila_build_expr_str" ref 495 val_args 6 based structure array level 2 dcl 6-3 set ref 527* 527 var parameter char unaligned dcl 446 set ref 441 448 452 454 454* var_info 2 based structure array level 2 dcl 7-3 var_ptr 12 based pointer array level 3 dcl 7-3 set ref 248* variable 000132 automatic char(32) unaligned dcl 94 set ref 300* 301* 306* variables based structure level 1 dcl 7-3 work_area based area dcl 98 ref 409 470 492 525 NAMES DECLARED BY DECLARE STATEMENT AND NEVER REFERENCED. AND internal static fixed bin(17,0) initial dcl 8-13 COL_SPEC internal static fixed bin(17,0) initial dcl 8-13 COMMA internal static fixed bin(17,0) initial dcl 8-13 CONST internal static fixed bin(17,0) initial dcl 8-13 DIFFER internal static fixed bin(17,0) initial dcl 8-13 DIV internal static fixed bin(17,0) initial dcl 8-13 DUP internal static fixed bin(17,0) initial dcl 8-13 EQ internal static fixed bin(17,0) initial dcl 8-13 FROM internal static fixed bin(17,0) initial dcl 8-13 GE internal static fixed bin(17,0) initial dcl 8-13 GT internal static fixed bin(17,0) initial dcl 8-13 INTER internal static fixed bin(17,0) initial dcl 8-13 LB internal static fixed bin(17,0) initial dcl 8-13 LE internal static fixed bin(17,0) initial dcl 8-13 LINUS_VAR internal static fixed bin(17,0) initial dcl 8-13 LP internal static fixed bin(17,0) initial dcl 8-13 LT internal static fixed bin(17,0) initial dcl 8-13 MINUS internal static fixed bin(17,0) initial dcl 8-13 NE internal static fixed bin(17,0) initial dcl 8-13 NOT internal static fixed bin(17,0) initial dcl 8-13 OR internal static fixed bin(17,0) initial dcl 8-13 PLUS internal static fixed bin(17,0) initial dcl 8-13 RB internal static fixed bin(17,0) initial dcl 8-13 ROW_DES internal static fixed bin(17,0) initial dcl 8-13 ROW_TAB_PAIR internal static fixed bin(17,0) initial dcl 8-13 RP internal static fixed bin(17,0) initial dcl 8-13 SCAL_FN internal static fixed bin(17,0) initial dcl 8-13 SELECT internal static fixed bin(17,0) initial dcl 8-13 SET_FN internal static fixed bin(17,0) initial dcl 8-13 STAR internal static fixed bin(17,0) initial dcl 8-13 TAB_NAME internal static fixed bin(17,0) initial dcl 8-13 UNION internal static fixed bin(17,0) initial dcl 8-13 UNIQUE internal static fixed bin(17,0) initial dcl 8-13 WHERE internal static fixed bin(17,0) initial dcl 8-13 desc_ptr automatic pointer dcl 11-19 ed_ptr automatic pointer dcl 9-22 fixed builtin function dcl 130 initial_number_of_linus_set_fn_args automatic fixed bin(17,0) dcl 10-54 linus_set_fn_ptr automatic pointer dcl 10-55 nvars_init automatic fixed bin(17,0) dcl 7-15 rel builtin function dcl 130 sys_info$max_seg_size external static fixed bin(35,0) dcl 115 NAMES DECLARED BY EXPLICIT CONTEXT. check_var 002373 constant entry internal dcl 441 ref 227 306 combine 002122 constant entry internal dcl 393 ref 371 379 385 finish 002727 constant entry internal dcl 505 ref 190 205 linus_lila_build_expr_str 000074 constant entry external dcl 19 next 001736 constant label dcl 351 ref 192 220 237 254 274 293 314 324 349 reduce 001750 constant entry internal dcl 359 ref 212 334 512 set_ord_block 002514 constant entry internal dcl 461 ref 228 269 set_val_block 002621 constant entry internal dcl 481 ref 248 286 token_proc 000000 constant label array(0:34) dcl 162 ref 160 THERE WERE NO NAMES DECLARED BY CONTEXT OR IMPLICATION. STORAGE REQUIREMENTS FOR THIS PROGRAM. Object Text Link Symbol Defs Static Start 0 0 3410 3456 3153 3420 Length 4154 3153 46 461 235 0 BLOCK NAME STACK SIZE TYPE WHY NONQUICK/WHO SHARES STACK FRAME linus_lila_build_expr_str 241 external procedure is an external procedure. reduce internal procedure shares stack frame of external procedure linus_lila_build_expr_str. combine internal procedure shares stack frame of external procedure linus_lila_build_expr_str. check_var 84 internal procedure is called during a stack extension. set_ord_block 66 internal procedure is called during a stack extension. set_val_block internal procedure shares stack frame of external procedure linus_lila_build_expr_str. finish internal procedure shares stack frame of external procedure linus_lila_build_expr_str. STORAGE FOR AUTOMATIC VARIABLES. STACK FRAME LOC IDENTIFIER BLOCK NAME linus_lila_build_expr_str 000100 lsb_ptr linus_lila_build_expr_str 000102 nval_args_init linus_lila_build_expr_str 000103 ms_len_init linus_lila_build_expr_str 000104 mblk_ptr linus_lila_build_expr_str 000106 lv_ptr linus_lila_build_expr_str 000110 num_dims linus_lila_build_expr_str 000111 icode linus_lila_build_expr_str 000112 nops linus_lila_build_expr_str 000113 nitems linus_lila_build_expr_str 000114 local_pcnt linus_lila_build_expr_str 000115 i linus_lila_build_expr_str 000116 done linus_lila_build_expr_str 000117 expr_flag linus_lila_build_expr_str 000120 atom_flag linus_lila_build_expr_str 000121 aop_flag linus_lila_build_expr_str 000122 lp_flag linus_lila_build_expr_str 000123 rp_flag linus_lila_build_expr_str 000124 end_flag linus_lila_build_expr_str 000126 exp_hd_ptr linus_lila_build_expr_str 000130 lss_ptr linus_lila_build_expr_str 000132 variable linus_lila_build_expr_str 000142 master_var linus_lila_build_expr_str 000152 expr_data linus_lila_build_expr_str 000152 op_stack linus_lila_build_expr_str 000170 done reduce 000200 b1p combine 000202 b2p combine 000204 i combine 000224 bp finish THE FOLLOWING EXTERNAL OPERATORS ARE USED BY THIS PROGRAM. alloc_cs cat_realloc_cs call_ext_out_desc call_ext_out call_int_this_desc return alloc_auto_adj shorten_stack ext_entry_desc int_entry_desc alloc_based THE FOLLOWING EXTERNAL ENTRIES ARE CALLED BY THIS PROGRAM. linus_lila_build_scfn_str linus_lila_error linus_lila_get_token linus_lila_set_fn THE FOLLOWING EXTERNAL VARIABLES ARE USED BY THIS PROGRAM. linus_data_$max_expr_items linus_data_$max_pred_stack_size linus_data_$max_range_items linus_error_$const_expr_fn linus_error_$expr_ovfl linus_error_$expr_str linus_error_$inv_expr linus_error_$inv_tup_var linus_error_$unbal_parens mrds_data_$max_select_items mrds_data_$max_token_size LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC LINE LOC 19 000066 11 20 000107 100 000110 101 000121 138 000125 140 000130 141 000134 142 000137 143 000144 145 000146 147 000151 149 000155 150 000156 152 000160 153 000165 156 000206 160 000242 162 000246 190 000300 191 000301 192 000303 194 000304 199 000336 203 000406 205 000412 206 000413 207 000415 208 000416 212 000451 213 000453 214 000473 215 000475 217 000501 218 000504 220 000511 222 000512 227 000546 228 000571 230 000635 232 000642 233 000644 235 000647 236 000652 237 000657 239 000660 244 000712 245 000717 247 000743 248 000745 251 000763 252 000770 253 000773 254 000777 257 001000 264 001034 269 001077 270 001115 271 001122 273 001125 274 001131 276 001132 281 001164 284 001206 286 001242 290 001264 292 001267 293 001273 295 001274 300 001330 301 001333 304 001366 306 001422 307 001432 308 001434 309 001436 310 001440 311 001441 313 001444 314 001450 316 001451 321 001503 322 001521 323 001522 324 001527 326 001530 334 001562 338 001641 342 001671 343 001672 344 001702 345 001723 346 001726 348 001732 349 001735 354 001736 355 001744 356 001746 357 001747 359 001750 367 001752 369 001753 371 001763 372 001764 377 001766 379 001777 381 002025 382 002027 383 002031 385 002041 388 002116 389 002120 439 002121 393 002122 402 002123 403 002125 404 002130 407 002143 409 002146 410 002174 411 002177 415 002301 416 002311 418 002316 420 002322 421 002324 423 002337 426 002351 429 002355 430 002357 431 002361 432 002363 433 002365 434 002367 435 002370 437 002371 441 002372 448 002406 452 002441 454 002455 459 002512 461 002513 468 002527 469 002531 470 002532 471 002562 472 002564 473 002603 474 002605 475 002607 476 002610 479 002620 481 002621 490 002623 491 002625 492 002627 493 002655 494 002657 495 002674 497 002712 498 002715 499 002721 500 002723 501 002725 503 002726 505 002727 512 002730 513 002732 515 002764 516 002766 518 002776 519 003002 521 003013 523 003014 524 003020 525 003022 526 003050 527 003053 528 003062 529 003124 530 003126 533 003130 ----------------------------------------------------------- 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