version 1.2, 2000/01/21 03:01:25 |
version 1.8, 2020/10/07 23:53:25 |
|
|
/* $OpenXM$ */ |
/* $OpenXM: OpenXM/src/k097/d.h,v 1.7 2015/10/10 11:29:46 takayama Exp $ */ |
/* d.h;*/ |
/* d.h;*/ |
/* from stackm.h */ |
/* from stackm.h */ |
|
#include <string.h> |
|
#include <stdlib.h> |
|
|
/**** data types (class identifiers) ************/ |
/**** data types (class identifiers) ************/ |
#define Snull 0 |
#define Snull 0 |
|
|
int tag; /* class identifier */ |
int tag; /* class identifier */ |
union cell lc; /* left cell */ |
union cell lc; /* left cell */ |
union cell rc; /* right cell */ |
union cell rc; /* right cell */ |
|
struct object *attr; |
}; |
}; |
|
|
struct object{ /* must be compatible with stackm.h */ |
struct object{ /* must be compatible with stackm.h */ |
int tag; /* class identifier */ |
int tag; /* class identifier */ |
union cell lc; /* left cell */ |
union cell lc; /* left cell */ |
union cell rc; /* right cell */ |
union cell rc; /* right cell */ |
|
struct object *attr; |
}; |
}; |
|
|
|
#define OINIT { .attr = NULL } |
|
|
typedef struct Object * objectp; /* cf. 65p of Schreiner. */ |
typedef struct Object * objectp; /* cf. 65p of Schreiner. */ |
#define YYSTYPE objectp |
#define YYSTYPE objectp |
|
|
Line 124 void *mymalloc(int size); |
|
Line 130 void *mymalloc(int size); |
|
int isProtectedSymbol(char *s); |
int isProtectedSymbol(char *s); |
int ips(objectp op); |
int ips(objectp op); |
/* read from file */ |
/* read from file */ |
void parseAFile(FILE *fp); |
void parseAfile(FILE *fp); |
void parseAstring(char *s); |
void parseAstring(char *s); |
int fsgetc(objectp op); |
int fsgetc(objectp op); |
int fsungetc(int c,objectp op); |
int fsungetc(int c,objectp op); |
void readLineFromFile(FILE *fp,struct stringBuf *obuf); |
void readLineFromFile(FILE *fp,struct stringBuf *obuf); |
struct stringBuf *newStringBuf(char *initstr); |
struct stringBuf *newStringBuf(char *initstr); |
void doublingStringBuf(struct stringBuf *sbuf); |
void doublingStringBuf(struct stringBuf *sbuf); |
|
objectp checkIfTheFileExists(objectp name); |
void loadFile(objectp op); |
void loadFile(objectp op); |
void loadFileWithCpp(objectp op); |
void loadFileWithCpp(objectp op); |
void showStringBuff(objectp op); |
void showStringBuff(objectp op); |
Line 165 void K00recoverFromError(); |
|
Line 172 void K00recoverFromError(); |
|
int K00declareClass(char *name,char *supername); |
int K00declareClass(char *name,char *supername); |
void K00toPrimitiveClass(); |
void K00toPrimitiveClass(); |
|
|
|
void *GC_malloc(size_t size); |
|
void *sGC_malloc(size_t size); |
|
|
|
int KClex(); |
|
int KCerror(char *s); |
|
int KCparse(); |
|
int sendKan(int p); |
|
void printTens(objectp op); |
|
void K00foo1(); |
|
void K00fooPrimitive(); |
|
void repl(FILE *inFile,FILE *outFile); |
|
int readcomment(); |
|
int readchar(); |
|
void putchar0(int c); |
|
void printf0(char *s); |
|
void printf1(char *s); |
|
int isReserved(char *s); |
|
int shouldReplace(char *s); |
|
|
|
|
|
|