[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.2

1.2     ! takayama    1: /* $OpenXM: OpenXM/src/kan96xx/trans/yymain_polymake.c,v 1.1 2003/11/24 02:33:39 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:   }
                     14:   SS = pmPutstr(0);
                     15:   printf("%s\n",SS);
                     16:   pmSetS(SS);
                     17:   pmPreprocess();
                     18:   printf("--------------------------\n");
                     19:   printf("%s\n",SS);
                     20:   printf("--------------------------\n");
                     21:   while ((type=PMlex()) != PM_noToken) {
                     22:        printf("type=%d ",type);
                     23:        if ((type == PM_number) || (type == PM_keyword)) {
                     24:          printf("value="); pmPrintObject(stdout,PMlval);
                     25:        }
                     26:        printf("\n");
                     27:   }
                     28: }
                     29:
                     30: main() {
                     31:   int c,type;
                     32:
                     33:   pmPutstr(-1);
                     34:   while ((c=getchar()) != EOF) {
                     35:        pmPutstr(c);
                     36:   }
                     37:   SS = pmPutstr(0);
1.2     ! takayama   38: #ifdef DEBUG
1.1       takayama   39:   printf("%s\n",SS);
1.2     ! takayama   40: #endif
1.1       takayama   41:   pmSetS(SS);
                     42:   pmPreprocess();
1.2     ! takayama   43: #ifdef DEBUG
1.1       takayama   44:   printf("--------------------------\n");
                     45:   printf("%s\n",SS);
                     46:   printf("--------------------------\n");
1.2     ! takayama   47: #endif
1.1       takayama   48:   PMparse();
                     49: }
                     50:
                     51: sGC_malloc(int n) {
                     52:   return GC_malloc(n);
                     53: }
                     54:
                     55: PMerror() {
                     56: }

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