version 1.4, 2004/09/20 02:11:22 |
version 1.7, 2022/09/08 10:49:30 |
|
|
/* $OpenXM: OpenXM/src/kan96xx/Kan/mklookup.c,v 1.3 2001/05/04 01:06:24 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/Kan/mklookup.c,v 1.6 2020/10/06 11:33:46 takayama Exp $ */ |
|
/* |
|
If you add new names, update lookup.h by |
|
make gen-lookup.h |
|
*/ |
#include <stdio.h> |
#include <stdio.h> |
|
#include <stdlib.h> |
#include "datatype.h" |
#include "datatype.h" |
#include "stackm.h" |
#include "stackm.h" |
|
|
/* Refer to global.c. You need to keep the orders of names and values */ |
/* Refer to global.c. You need to keep the orders of names and values */ |
main() { |
int main() { |
int i,j; |
int i,j; |
char *names[]={"Snull","Sinteger","Sstring","SexecutableArray","Soperator", |
char *names[]={"Snull","Sinteger","Sstring","SexecutableArray","Soperator", |
"Sdollar","Sarray","SleftBraceTag","SrightBraceTag","Spoly", |
"Sdollar","Sarray","SleftBraceTag","SrightBraceTag","Spoly", |
|
|
for (i=0; i<TYPES; i++) { |
for (i=0; i<TYPES; i++) { |
if (values[i] != i) { |
if (values[i] != i) { |
fprintf(stderr,"Errors in names and values\n"); |
fprintf(stderr,"Errors in names and values\n"); |
exit(100); |
return 100; |
} |
} |
for (j=0; j<TYPES; j++) { |
for (j=0; j<TYPES; j++) { |
printf("#define %s%s %d\n",names[i],names[j],values[i]*TYPES+values[j]); |
printf("#define %s%s %d\n",names[i],names[j],values[i]*TYPES+values[j]); |
} |
} |
} |
} |
exit(0); |
return 0; |
} |
} |
|
|
|
|