version 1.3, 2021/03/11 03:41:13 |
version 1.4, 2021/03/11 09:20:49 |
|
|
/* $OpenXM: OpenXM_contrib2/asir2018/parse/quote.c,v 1.2 2018/09/28 08:20:29 noro Exp $ */ |
/* $OpenXM: OpenXM_contrib2/asir2018/parse/quote.c,v 1.3 2021/03/11 03:41:13 noro Exp $ */ |
|
|
#include "ca.h" |
#include "ca.h" |
#include "parse.h" |
#include "parse.h" |
Line 311 void vartoquote(V v,QUOTE *c) |
|
Line 311 void vartoquote(V v,QUOTE *c) |
|
QUOTE a,b,u; |
QUOTE a,b,u; |
int i; |
int i; |
FUNC f; |
FUNC f; |
NODE t,t1; |
Z z; |
|
FNODE fa,fd; |
|
NODE t,t1,s,s1; |
|
|
if ( NAME(v) ) { |
if ( NAME(v) ) { |
MKV(v,x); |
MKV(v,x); |
Line 335 void vartoquote(V v,QUOTE *c) |
|
Line 337 void vartoquote(V v,QUOTE *c) |
|
objtoquote(ad[1].arg,&b); |
objtoquote(ad[1].arg,&b); |
pwrquote(CO,a,b,c); |
pwrquote(CO,a,b,c); |
} else { |
} else { |
|
gen_searchf(NAME(pf),&f); |
for ( i = 0; i < pf->argc; i++ ) |
for ( i = 0; i < pf->argc; i++ ) |
if ( ad[i].d ) |
if ( ad[i].d ) |
break; |
break; |
if ( i < pf->argc ) |
if ( i < pf->argc ) { |
error("vartoquote : not implemented"); |
t = s = 0; |
gen_searchf(NAME(pf),&f); |
for ( i = pf->argc-1; i >= 0; i-- ) { |
t = 0; |
objtoquote(ad[i].arg,&a); |
for ( i = pf->argc-1; i >= 0; i-- ) { |
MKNODE(t1,BDY(a),t); |
objtoquote(ad[i].arg,&a); |
t = t1; |
MKNODE(t1,BDY(a),t); |
STOZ(ad[i].d,z); |
t = t1; |
objtoquote((Obj)z,&a); |
|
MKNODE(s1,BDY(a),s); |
|
s = s1; |
|
} |
|
fa = mkfnode(1,I_LIST,t); |
|
fd = mkfnode(1,I_LIST,s); |
|
MKQUOTE(*c,mkfnode(3,I_PFDERIV,f,fa,fd)); |
|
} else { |
|
t = 0; |
|
for ( i = pf->argc-1; i >= 0; i-- ) { |
|
objtoquote(ad[i].arg,&a); |
|
MKNODE(t1,BDY(a),t); |
|
t = t1; |
|
} |
|
MKQUOTE(*c,mkfnode(2,I_FUNC,f,mkfnode(1,I_LIST,t))); |
} |
} |
MKQUOTE(*c,mkfnode(2,I_FUNC,f,mkfnode(1,I_LIST,t))); |
|
} |
} |
} |
} |
} |
} |