version 1.4, 2005/04/06 09:26:28 |
version 1.5, 2005/04/15 12:47:14 |
|
|
/* $OpenXM: OpenXM/src/asir-contrib/testing/tr.rr,v 1.3 2005/04/03 11:05:21 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/asir-contrib/testing/tr.rr,v 1.4 2005/04/06 09:26:28 takayama Exp $ */ |
/* $Id$ */ |
/* $Id$ */ |
|
|
/* |
/* |
Line 170 def tr_apply_function0(Q,BindTable) { |
|
Line 170 def tr_apply_function0(Q,BindTable) { |
|
} |
} |
R = R+")"; |
R = R+")"; |
dprint0("R="); dprint(R); |
dprint0("R="); dprint(R); |
return eval_str(R); |
V=eval_str(R); |
|
if (type(V) == 17) return quotetolist(V); |
|
else return V; |
} |
} |
|
|
|
|
Line 280 def qt_replace(F,Rule) { |
|
Line 282 def qt_replace(F,Rule) { |
|
} |
} |
|
|
/* F $B$NCf$KITDj85(B X $B$,4^$^$l$F$$$k$+(B? |
/* F $B$NCf$KITDj85(B X $B$,4^$^$l$F$$$k$+(B? |
qt_dependent(quotetolist(quote(1+1/x)),x) |
qt_is_dependent(quotetolist(quote(1+1/x)),x) |
*/ |
*/ |
def qt_dependent(F,X) { |
def qt_is_dependent(F,X) { |
if (type(F) == 17) F = quotetolist(F); |
if (type(F) == 17) F = quotetolist(F); |
Node = qt_node(F); |
Node = qt_node(F); |
if ((F[0] == "internal") && (rtostr(F[1]) == rtostr(X))) { |
if ((F[0] == "internal") && (rtostr(F[1]) == rtostr(X))) { |
Line 291 def qt_dependent(F,X) { |
|
Line 293 def qt_dependent(F,X) { |
|
N = qt_nchild(F); |
N = qt_nchild(F); |
for (I=0; I<N;I++) { |
for (I=0; I<N;I++) { |
C = qt_child(F,I); |
C = qt_child(F,I); |
if (qt_dependent(C,X)) return 1; |
if (qt_is_dependent(C,X)) return 1; |
} |
} |
return 0; |
return 0; |
} |
} |
Line 340 def qt_map_arg(F,Q) { |
|
Line 342 def qt_map_arg(F,Q) { |
|
dprint0("qt_map_arg:T="); dprint(T); |
dprint0("qt_map_arg:T="); dprint(T); |
T = listtoquote_str(T); |
T = listtoquote_str(T); |
return eval_str("quote("+T+")"); |
return eval_str("quote("+T+")"); |
|
} |
|
|
|
/* Index $BIU$-JQ?t$r<B8=$9$k(B */ |
|
def idxtov(V,I) { |
|
if (type(I) == 5) I=vtol(I); |
|
if (type(I) != 4) I=[I]; |
|
if (type(V) != 2) V=rtostr(V); |
|
return util_v(V,I); |
|
} |
|
|
|
def vtoidx(V) { |
|
A = util_index(V); |
|
if (length(A[1]) == 0) return [A[0]]; |
|
if (length(A[1]) == 1) return [A[0],A[1][0]]; |
|
return A; |
} |
} |
|
|
/* $B$3$l$i0J30$N%F%9%H%W%m%0%i%`$O(B test1-tr.rr $B$r(B |
/* $B$3$l$i0J30$N%F%9%H%W%m%0%i%`$O(B test1-tr.rr $B$r(B |