File: [local] / OpenXM / src / kan96xx / Kan / Attic / yymain_polymake.c (download)
Revision 1.3, Thu Nov 20 07:56:00 2003 UTC (20 years, 10 months ago) by takayama
Branch: MAIN
Changes since 1.2: +4 -1
lines
pmObjectToStr(pmObjectp p)
translates an object p to the tfb/2 expression in a string.
|
/* $OpenXM: OpenXM/src/kan96xx/Kan/yymain_polymake.c,v 1.3 2003/11/20 07:56:00 takayama Exp $ */
#include <stdio.h>
#include "yylex_polymake.h"
#include "yy_polymake.tab.h"
char *SS=NULL;
main_t() {
int c,type;
pmPutstr(-1);
while ((c=getchar()) != EOF) {
pmPutstr(c);
}
SS = pmPutstr(0);
printf("%s\n",SS);
pmSetS(SS);
pmPreprocess();
printf("--------------------------\n");
printf("%s\n",SS);
printf("--------------------------\n");
while ((type=PMlex()) != PM_noToken) {
printf("type=%d ",type);
if ((type == PM_number) || (type == PM_keyword)) {
printf("value="); pmPrintObject(stdout,PMlval);
}
printf("\n");
}
}
main() {
int c,type;
pmPutstr(-1);
while ((c=getchar()) != EOF) {
pmPutstr(c);
}
SS = pmPutstr(0);
printf("%s\n",SS);
pmSetS(SS);
pmPreprocess();
printf("--------------------------\n");
printf("%s\n",SS);
printf("--------------------------\n");
PMparse();
}
sGC_malloc(int n) {
return GC_malloc(n);
}
PMerror() {
}