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

Diff for /OpenXM/src/kan96xx/trans/yylex_polymake.c between version 1.1 and 1.4

version 1.1, 2003/11/24 02:33:39 version 1.4, 2004/08/21 00:39:53
Line 1 
Line 1 
 /* $OpenXM$ */  /* $OpenXM: OpenXM/src/kan96xx/trans/yylex_polymake.c,v 1.3 2004/07/15 07:50:40 takayama Exp $ */
 /* parser for polymake output */  /* parser for polymake output */
 /* This program requires  /* This program requires
   
Line 67  int PMlex_aux() {
Line 67  int PMlex_aux() {
   if (S[Pt] == PM_emptyLineCode) {Pt++; return PM_emptyLine; }    if (S[Pt] == PM_emptyLineCode) {Pt++; return PM_emptyLine; }
   if (S[Pt] == '{') { Pt++; return PM_LCurryBrace; }    if (S[Pt] == '{') { Pt++; return PM_LCurryBrace; }
   if (S[Pt] == '}') { Pt++; return PM_RCurryBrace; }    if (S[Pt] == '}') { Pt++; return PM_RCurryBrace; }
     if (S[Pt] == '<') { Pt++; return PM_LAngle; }
     if (S[Pt] == '>') { Pt++; return PM_RAngle; }
     if (S[Pt] == '(') { Pt++; return PM_LBrace; }
     if (S[Pt] == ')') { Pt++; return PM_RBrace; }
     if (S[Pt] == '[') { Pt++; return PM_LBracket; }
     if (S[Pt] == ']') { Pt++; return PM_RBracket; }
     if (S[Pt] == ':') { Pt++; return PM_colon; }
   if (((S[Pt] >= '0') && (S[Pt] <= '9')) || (S[Pt] == '-')) {    if (((S[Pt] >= '0') && (S[Pt] <= '9')) || (S[Pt] == '-')) {
         putstr(-1); putstr(S[Pt++]);          putstr(-1); putstr(S[Pt++]);
         while (((S[Pt]>='0') && (S[Pt]<='9')) || (S[Pt] == '/')) putstr(S[Pt++]);          while (((S[Pt]>='0') && (S[Pt]<='9')) || (S[Pt] == '/')) putstr(S[Pt++]);
Line 75  int PMlex_aux() {
Line 82  int PMlex_aux() {
   }    }
   if (((S[Pt] >= 'A') && (S[Pt] <= 'Z')) ||    if (((S[Pt] >= 'A') && (S[Pt] <= 'Z')) ||
       ((S[Pt] >= 'a') && (S[Pt] <= 'z')) ||        ((S[Pt] >= 'a') && (S[Pt] <= 'z')) ||
       (S[Pt] == '_')) {        (S[Pt] == '_') || S[Pt] == '!') {
         putstr(-1); putstr(S[Pt++]);      if (S[Pt] != '!') {putstr(-1); putstr(S[Pt++]);}
         while (((S[Pt] >= 'A') && (S[Pt] <= 'Z')) ||      else {
       ((S[Pt] >= 'a') && (S[Pt] <= 'z')) ||            putstr(-1); Pt++;
       (S[Pt] == '_')) putstr(S[Pt++]);            putstr('N'); putstr('O'); putstr('T'); putstr('_'); putstr('_');
         PMlval = pmNewStrObject(putstr(0));          }
         return PM_keyword;      while (((S[Pt] >= 'A') && (S[Pt] <= 'Z')) ||
              ((S[Pt] >= 'a') && (S[Pt] <= 'z')) ||
              (S[Pt] == '_')) putstr(S[Pt++]);
       PMlval = pmNewStrObject(putstr(0));
       return PM_keyword;
   }    }
   Pt++;  return PM_unknown;    Pt++;  return PM_unknown;
 }  }
Line 186  pmPreprocess() {
Line 197  pmPreprocess() {
           break;            break;
         case 1:          case 1:
           if ((S[oldp] == ' ') || (S[oldp] == '\t')) break;            if ((S[oldp] == ' ') || (S[oldp] == '\t')) break;
           if ((S[oldp] == '#') || ((S[oldp]=='_') && (S[oldp-1]<' '))) {            if ((S[oldp] == '#') || ((S[oldp]=='_') && (oldp == 0))
                   || ((S[oldp]=='_') && (S[oldp-1]<' '))) {
                 /* skip the rest of the line, state=1; */                  /* skip the rest of the line, state=1; */
                 for (; S[oldp] != 0 ; oldp++) {                  for (; S[oldp] != 0 ; oldp++) {
                   if (S[oldp] == '\n') {oldp--; break;}                    if (S[oldp] == '\n') {oldp--; break;}

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

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