version 1.4, 2019/11/12 10:53:23 |
version 1.5, 2020/10/06 06:31:20 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2018/parse/eval.c,v 1.3 2019/08/21 00:37:47 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2018/parse/eval.c,v 1.4 2019/11/12 10:53:23 kondoh Exp $ |
*/ |
*/ |
#include <ctype.h> |
#include <ctype.h> |
#include "ca.h" |
#include "ca.h" |
Line 435 FNODE fnode_to_nary(FNODE f) |
|
Line 435 FNODE fnode_to_nary(FNODE f) |
|
|
|
default: |
default: |
error("fnode_to_nary : not implemented yet"); |
error("fnode_to_nary : not implemented yet"); |
|
return 0; |
} |
} |
} |
} |
|
|
Line 506 FNODE fnode_to_bin(FNODE f,int dir) |
|
Line 507 FNODE fnode_to_bin(FNODE f,int dir) |
|
|
|
default: |
default: |
error("fnode_to_bin : not implemented yet"); |
error("fnode_to_bin : not implemented yet"); |
|
return 0; |
} |
} |
} |
} |
|
|
Line 583 FNODE partial_eval(FNODE f) |
|
Line 585 FNODE partial_eval(FNODE f) |
|
|
|
default: |
default: |
error("partial_eval : not implemented yet"); |
error("partial_eval : not implemented yet"); |
|
return 0; |
} |
} |
} |
} |
|
|
Line 666 FNODE rewrite_fnode(FNODE f,NODE arg,int qarg) |
|
Line 669 FNODE rewrite_fnode(FNODE f,NODE arg,int qarg) |
|
|
|
default: |
default: |
error("rewrite_fnode : not implemented yet"); |
error("rewrite_fnode : not implemented yet"); |
|
return 0; |
} |
} |
} |
} |
|
|
Line 1396 void searchuf(char *name,FUNC *r) |
|
Line 1400 void searchuf(char *name,FUNC *r) |
|
MODULE mod; |
MODULE mod; |
char *name0,*dot; |
char *name0,*dot; |
|
|
if ( dot = strchr(name,'.') ) { |
if ( ( dot = strchr(name,'.') ) != 0 ) { |
name0 = (char *)ALLOCA(strlen(name)+1); |
name0 = (char *)ALLOCA(strlen(name)+1); |
strcpy(name0,name); |
strcpy(name0,name); |
dot = strchr(name0,'.'); |
dot = strchr(name0,'.'); |
Line 1455 void searchf(NODE fn,char *name,FUNC *r) |
|
Line 1459 void searchf(NODE fn,char *name,FUNC *r) |
|
{ |
{ |
NODE tn; |
NODE tn; |
|
|
for ( tn = fn; |
for ( tn = fn; tn && strcmp(NAME((FUNC)BDY(tn)),name); tn = NEXT(tn) ) |
tn && strcmp(NAME((FUNC)BDY(tn)),name); tn = NEXT(tn) ); |
; |
if ( tn ) { |
if ( tn ) { |
*r = (FUNC)BDY(tn); |
*r = (FUNC)BDY(tn); |
return; |
return; |
} |
} |
*r = 0; |
*r = 0; |
} |
} |
|
|
Line 1476 void appenduf(char *name,FUNC *r) |
|
Line 1480 void appenduf(char *name,FUNC *r) |
|
|
|
f=(FUNC)MALLOC(sizeof(struct oFUNC)); |
f=(FUNC)MALLOC(sizeof(struct oFUNC)); |
f->id = A_UNDEF; f->argc = 0; f->f.binf = 0; |
f->id = A_UNDEF; f->argc = 0; f->f.binf = 0; |
if ( dot = strchr(name,'.') ) { |
if ( ( dot = strchr(name,'.') ) != 0 ) { |
/* undefined function in a module */ |
/* undefined function in a module */ |
len = dot-name; |
len = dot-name; |
modname = (char *)MALLOC_ATOMIC(len+1); |
modname = (char *)MALLOC_ATOMIC(len+1); |