version 1.2, 2004/04/08 01:49:04 |
version 1.7, 2020/10/06 11:33:48 |
|
|
/* $OpenXM: OpenXM/src/kan96xx/trans/yylex_polymake.c,v 1.1 2003/11/24 02:33:39 takayama Exp $ */ |
/* $OpenXM: OpenXM/src/kan96xx/trans/yylex_polymake.c,v 1.6 2018/05/03 13:20:35 takayama Exp $ */ |
/* parser for polymake output */ |
/* parser for polymake output */ |
/* This program requires |
/* This program requires |
|
|
Line 38 char *pmPutstr(int c) { |
|
Line 38 char *pmPutstr(int c) { |
|
return putstr(c); |
return putstr(c); |
} |
} |
|
|
pmSetS(char *s) { |
int pmSetS(char *s) { |
S = s; |
S = s; |
return 0; |
return 0; |
} |
} |
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] == '=') { Pt++; return PM_eq; } |
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 83 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 152 static char *putstr2s(char *s) { |
|
Line 164 static char *putstr2s(char *s) { |
|
return ss; |
return ss; |
} |
} |
|
|
pmPreprocess() { |
int pmPreprocess() { |
int newp,oldp; |
int newp,oldp; |
int state; |
int state; |
int i,j; |
int i,j; |
Line 331 pmObjectp pmAddChild(pmObjectp c,pmObjectp a) { |
|
Line 343 pmObjectp pmAddChild(pmObjectp c,pmObjectp a) { |
|
return a; |
return a; |
} |
} |
|
|
warning_yylex_polymake(char *s) { |
void warning_yylex_polymake(char *s) { |
fprintf(stderr,"Warning: %s",s); |
fprintf(stderr,"Warning: %s",s); |
} |
} |
|
|