| version 1.5, 2003/08/22 16:08:20 |
version 1.6, 2003/12/05 14:02:23 |
|
|
| /* $OpenXM: OpenXM/src/k097/ki.c,v 1.4 2002/02/24 10:27:21 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/k097/ki.c,v 1.5 2003/08/22 16:08:20 ohara Exp $ */ |
| /* ki.c ( kx interpreter ) */ |
/* ki.c ( kx interpreter ) */ |
| |
|
| #include <stdio.h> |
#include <stdio.h> |
|
|
| extern int Interactive; |
extern int Interactive; |
| struct object obj; |
struct object obj; |
| int result; |
int result; |
| |
extern int InSendmsg2; |
| signal(SIGINT,SIG_IGN); /* Don't jump to ctrlC(). */ |
signal(SIGINT,SIG_IGN); /* Don't jump to ctrlC(). */ |
| if (p == 10) {printf("In(%d)= ",n++); return;} |
if (p == 10) {printf("In(%d)= ",n++); return;} |
| if (p == 0 && DebugCompiler) printf("sendKan[%s]\n",Kbuff); |
if (p == 0 && DebugCompiler) printf("sendKan[%s]\n",Kbuff); |
|
|
| } |
} |
| /* fprintf(stderr,"r=%d ",result); */ |
/* fprintf(stderr,"r=%d ",result); */ |
| if (result == -1) { |
if (result == -1) { |
| K00recoverFromError(); |
K00recoverFromError(); InSendmsg2 = 0; |
| fprintf(stderr,"--- Engine error or interrupt : "); |
fprintf(stderr,"--- Engine error or interrupt : "); |
| if (DebugMode) { |
if (DebugMode) { |
| signal(SIGINT,SIG_DFL); |
signal(SIGINT,SIG_DFL); |
|
|
| #define AFO |
#define AFO |
| #ifdef AFO |
#ifdef AFO |
| if (SETJMP(KCenvOfParser)) { |
if (SETJMP(KCenvOfParser)) { |
| |
InSendmsg2=0; |
| fprintf(stderr,"Error: Goto the top level.\n"); |
fprintf(stderr,"Error: Goto the top level.\n"); |
| parseAfile(stdin); |
parseAfile(stdin); |
| KCparse(); |
KCparse(); |