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

Annotation of OpenXM/src/kan96xx/trans/yymain_polymake.c, Revision 1.5

1.5     ! takayama    1: /* $OpenXM: OpenXM/src/kan96xx/trans/yymain_polymake.c,v 1.4 2004/07/15 07:50:40 takayama Exp $ */
1.1       takayama    2: #include <stdio.h>
                      3: #include "yylex_polymake.h"
                      4: #include "yy_polymake.tab.h"
                      5:
1.2       takayama    6:
1.1       takayama    7: char *SS=NULL;
                      8: main_t() {
                      9:   int c,type;
                     10:   pmPutstr(-1);
                     11:   while ((c=getchar()) != EOF) {
                     12:        pmPutstr(c);
                     13:   }
1.3       takayama   14:   pmPutstr('\n');
1.1       takayama   15:   SS = pmPutstr(0);
                     16:   printf("%s\n",SS);
                     17:   pmSetS(SS);
                     18:   pmPreprocess();
                     19:   printf("--------------------------\n");
                     20:   printf("%s\n",SS);
                     21:   printf("--------------------------\n");
                     22:   while ((type=PMlex()) != PM_noToken) {
                     23:        printf("type=%d ",type);
                     24:        if ((type == PM_number) || (type == PM_keyword)) {
                     25:          printf("value="); pmPrintObject(stdout,PMlval);
                     26:        }
                     27:        printf("\n");
                     28:   }
                     29: }
                     30:
                     31: main() {
                     32:   int c,type;
1.5     ! takayama   33:   GC_INIT();
1.1       takayama   34:   pmPutstr(-1);
                     35:   while ((c=getchar()) != EOF) {
                     36:        pmPutstr(c);
                     37:   }
1.3       takayama   38:   pmPutstr('\n');
1.1       takayama   39:   SS = pmPutstr(0);
1.2       takayama   40: #ifdef DEBUG
1.1       takayama   41:   printf("%s\n",SS);
1.2       takayama   42: #endif
1.1       takayama   43:   pmSetS(SS);
                     44:   pmPreprocess();
1.2       takayama   45: #ifdef DEBUG
1.1       takayama   46:   printf("--------------------------\n");
                     47:   printf("%s\n",SS);
                     48:   printf("--------------------------\n");
1.2       takayama   49: #endif
1.1       takayama   50:   PMparse();
                     51: }
                     52:
1.5     ! takayama   53: void *sGC_malloc(int n) {
1.1       takayama   54:   return GC_malloc(n);
                     55: }
                     56:
                     57: PMerror() {
1.4       takayama   58:   fprintf(stderr,"Parse error. cf. yylex_polymake.c: PM_debug=1;\n");
1.1       takayama   59: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>