00001 # include "parm.h"
00002
00003 # include "stree/ststructs.mh"
00004
00005 # include "decl_pairs.h"
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 boolean
00016 dl_match(p,q)
00017 NODE * p;
00018 NODE * q;
00019 {
00020 struct p_pair * hd;
00021 ConsNode * tl;
00022
00023 for(tl = decl_list; tl != NIL; tl = cn_tail(tl)) {
00024 hd = (struct p_pair *) cn_head(tl);
00025 if (hd -> pp_1 -> pre_num == p -> pre_num
00026 && hd -> pp_2 -> pre_num == q -> pre_num) {
00027 return(TRUE);
00028 }
00029 }
00030 return(FALSE);
00031 }
00032
00033
00034
00035
00036
00037
00038 NODE *
00039 dl_new_decl(p)
00040 NODE * p;
00041 {
00042 struct p_pair * hd;
00043 ConsNode * tl;
00044
00045 # ifdef DEBUG
00046 if (p -> kind != LETTERID) {
00047 dbgmsg("dl_new_decl: bad arg\n");
00048 }
00049 # endif
00050 for(tl = decl_list; tl != NIL; tl = cn_tail(tl)) {
00051 hd = (struct p_pair *) cn_head(tl);
00052 if (is_declared_by(p, hd -> pp_1)) return(hd -> pp_2);
00053 }
00054 return(p -> id_last_definition);
00055 }