[BACK]Return to yymain_polymake.c CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / trans

File: [local] / OpenXM / src / kan96xx / trans / yymain_polymake.c (download)

Revision 1.2, Thu Dec 4 07:49:24 2003 UTC (20 years, 6 months ago) by takayama
Branch: MAIN
CVS Tags: RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX
Changes since 1.1: +6 -1 lines

"doPolymake" calls polymake to make several constructions for polytopes.
[action data_in_polymake_tfb_format] doPolymake
         [result_in_tfb result_in_tree errors]
polymake, polymake2tfb, ox_k0 must be installed.
Example:
 [(FACETS) (polymake.data(polymake.POINTS([[1,0,0],[1,1,0],[1,0,1],[1,0,0]])))]
         doPolymake /rr set

/* $OpenXM: OpenXM/src/kan96xx/trans/yymain_polymake.c,v 1.2 2003/12/04 07:49:24 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);
#ifdef DEBUG
  printf("%s\n",SS);
#endif
  pmSetS(SS);
  pmPreprocess();
#ifdef DEBUG
  printf("--------------------------\n");
  printf("%s\n",SS);
  printf("--------------------------\n");
#endif
  PMparse();
}

sGC_malloc(int n) {
  return GC_malloc(n);
}

PMerror() {
}