📄 test30.y
字号:
{
printf("%s(%d): syntax error: getusedseconds type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\n",outlineno++,looktokentable(GETUSEDSECONDS1));
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\n",outlineno,GETUSEDSECONDS1);
}
} |
GETRECORDSECONDS LEFTC RIGHTC
{
if(assigntype!=0)
{
printf("%s(%d): syntax error: getrecordseconds type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\n",outlineno++,looktokentable(GETRECORDSECONDS1));
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\n",outlineno,GETRECORDSECONDS1);
}
}
|
GETSUBSTRING LEFTC ID ',' ID ',' ID RIGHTC
{
int i;
i = lookstringtable($3);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$3);
errcount ++;
}
else if(i==1)
{
printf("%s(%d): syntax error: getsubstring function parameter1 need a string-type parameter \n",filename,lineno);
errcount ++;
}
i = lookstringtable($5);
if(i==0)
{
printf("%s(%d): syntax error: var %s no define\n ",filename,lineno,$5);
errcount ++;
}
else if(i==2)
{
printf("%s(%d): syntax error: getfieldvalue function parameter2 need a int-type parameter \n",filename,lineno);
errcount ++;
}
i = lookstringtable($7);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$7);
errcount ++;
}
else if(i==2)
{
printf("%s(%d): syntax error: getfieldvalue function parameter3 need a int-type parameter\n ",filename,lineno);
errcount ++;
}
if(assigntype!=1)
{
printf("%s(%d): syntax error: getfieldvalue type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\t%s\t%s\t%s\n",outlineno++,looktokentable(GETSUBSTRING1),$3,$5,$7);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\t%s\t%s\n",outlineno,GETSUBSTRING1,$3,$5,$7);
}
} |
GETSUBSTRING LEFTC ID ',' ID ',' NUMBER RIGHTC
{
int i;
i = lookstringtable($3);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$3);
errcount ++;
}
else if(i==1)
{
printf("%s(%d): syntax error: getsubstring function parameter1 need a string-type parameter \n",filename,lineno);
errcount ++;
}
i = lookstringtable($5);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$5);
errcount ++;
}
else if(i==2)
{
printf("%s(%d): syntax error: getfieldvalue function parameter2 need a int-type parameter \n",filename,lineno);
errcount ++;
}
if(assigntype!=1)
{
printf("%s(%d): syntax error: getfieldvalue type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\t%s\t%s\t%d\n",outlineno++,looktokentable(GETSUBSTRING2),$3,$5,$7);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\t%s\t%d\n",outlineno,GETSUBSTRING2,$3,$5,$7);
}
} |
GETSUBSTRING LEFTC ID ',' NUMBER ',' ID RIGHTC
{
int i;
i = lookstringtable($3);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$3);
errcount ++;
}
else if(i==1)
{
printf("%s(%d): syntax error: getsubstring function parameter1 need a string-type parameter \n",filename,lineno);
errcount ++;
}
i = lookstringtable($7);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$7);
errcount ++;
}
else if(i==2)
{
printf("%s(%d): syntax error: getfieldvalue function parameter3 need a int-type parameter \n",filename,lineno);
errcount ++;
}
if(assigntype!=1)
{
printf("%s(%d): syntax error: getsubstring type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\t%s\t%d\t%s\n",outlineno++,looktokentable(GETSUBSTRING3),$3,$5,$7);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\t%d\t%s\n",outlineno,GETSUBSTRING3,$3,$5,$7);
}
} |
GETSUBSTRING LEFTC ID ',' NUMBER ',' NUMBER RIGHTC
{
int i;
i = lookstringtable($3);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$3);
errcount ++;
}
else if(i==1)
{
printf("%s(%d): syntax error: getsubstring function parameter1 need a string-type parameter \n",filename,lineno);
errcount ++;
}
if(assigntype!=1)
{
printf("%s(%d): syntax error: getsubstring type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\t%s\t%d\t%d\n",outlineno++,looktokentable(GETSUBSTRING4),$3,$5,$7);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\t%d\t%d\n",outlineno,GETSUBSTRING4,$3,$5,$7);
}
} |
GETSUBSTRING LEFTC STR ',' ID ',' ID RIGHTC
{
int i;
i = lookstringtable($5);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$5);
errcount ++;
}
else if(i==2)
{
printf("%s(%d): syntax error: getfieldvalue function parameter2 need a int-type parameter \n",filename,lineno);
errcount ++;
}
i = lookstringtable($7);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$7);
errcount ++;
}
else if(i==2)
{
printf("%s(%d): syntax error: getfieldvalue function parameter3 need a int-type parameter \n",filename,lineno);
errcount ++;
}
if(assigntype!=1)
{
printf("%s(%d): syntax error: getsubstring type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\t%s\t%s\n",outlineno++,looktokentable(GETSUBSTRING5),$5,$7);
fprintf(yyout,"%5d:%s\n",outlineno++,$3);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\t%s\n",outlineno,GETSUBSTRING5,$5,$7);
outlineno++;
fprintf(yyout,"%5d:\t%s\n",outlineno,$3);
}
} |
GETSUBSTRING LEFTC STR ',' ID ',' NUMBER RIGHTC
{
int i;
i = lookstringtable($5);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$5);
errcount ++;
}
else if(i==2)
{
printf("%s(%d): syntax error: getfieldvalue function parameter2 need a int-type parameter \n",filename,lineno);
errcount ++;
}
if(assigntype!=1)
{
printf("%s(%d): syntax error: getsubstring type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\t%s\t%d\n",outlineno++,looktokentable(GETSUBSTRING6),$5,$7);
fprintf(yyout,"%5d:%s\n",outlineno++,$3);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\t%d\n",outlineno,GETSUBSTRING6,$5,$7);
outlineno++;
fprintf(yyout,"%5d:\t%s\n",outlineno,$3);
}
} |
GETSUBSTRING LEFTC STR ',' NUMBER ',' ID RIGHTC
{
int i;
i = lookstringtable($7);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$7);
errcount ++;
}
else if(i==2)
{
printf("%s(%d): syntax error: getfieldvalue function parameter2 need a int-type parameter \n",filename,lineno);
errcount ++;
}
if(assigntype!=1)
{
printf("%s(%d): syntax error: getsubstring type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\t%d\t%s\n",outlineno++,looktokentable(GETSUBSTRING7),$5,$7);
fprintf(yyout,"%5d:%s\n",outlineno++,$3);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%d\t%s\n",outlineno,GETSUBSTRING7,$5,$7);
outlineno++;
fprintf(yyout,"%5d:\t%s\n",outlineno,$3);
}
} |
GETSUBSTRING LEFTC STR ',' NUMBER ',' NUMBER RIGHTC
{
if(assigntype!=1)
{
printf("%s(%d): syntax error: getsubstring type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\t%d\t%d\n",outlineno++,looktokentable(GETSUBSTRING8),$5,$7);
fprintf(yyout,"%5d:%s\n",outlineno++,$3);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%d\t%d\n",outlineno,GETSUBSTRING8,$5,$7);
outlineno++;
fprintf(yyout,"%5d:\t%s\n",outlineno,$3);
}
} |
CHECKINTSECTION LEFTC ID ',' ID ',' ID RIGHTC
{
int i;
i = lookinttable($3);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$3);
errcount ++;
}
else if(i==2)
{
printf("%s(%d): syntax error: checkintsection function parameter1 need a int-type parameter \n",filename,lineno);
errcount ++;
}
i = lookstringtable($5);
if(i==0)
{
printf("%s(%d): syntax error: var %s no define\n ",filename,lineno,$5);
errcount ++;
}
else if(i==2)
{
printf("%s(%d): syntax error: checkintsection function parameter2 need a int-type parameter \n",filename,lineno);
errcount ++;
}
i = lookstringtable($7);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$7);
errcount ++;
}
else if(i==2)
{
printf("%s(%d): syntax error: checkintsection function parameter3 need a int-type parameter\n ",filename,lineno);
errcount ++;
}
if(assigntype!=0)
{
printf("%s(%d): syntax error: checkintsection type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\t%s\t%s\t%s\n",outlineno++,looktokentable(CHECKINTSECTION1),$3,$5,$7);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\t%s\t%s\n",outlineno,CHECKINTSECTION1,$3,$5,$7);
}
} |
CHECKINTSECTION LEFTC ID ',' ID ',' NUMBER RIGHTC
{
int i;
i = lookstringtable($3);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$3);
errcount ++;
}
else if(i==2)
{
printf("%s(%d): syntax error: checkintsection function parameter1 need a int-type parameter \n",filename,lineno);
errcount ++;
}
i = lookstringtable($5);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$5);
errcount ++;
}
else if(i==2)
{
printf("%s(%d): syntax error: checkintsection function parameter2 need a int-type parameter \n",filename,lineno);
errcount ++;
}
if(assigntype!=0)
{
printf("%s(%d): syntax error: checkintsection type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\t%s\t%s\t%d\n",outlineno++,looktokentable(CHECKINTSECTION2),$3,$5,$7);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\t%s\t%d\n",outlineno,CHECKINTSECTION2,$3,$5,$7);
}
} |
CHECKINTSECTION LEFTC ID ',' NUMBER ',' ID RIGHTC
{
int i;
i = lookstringtable($3);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$3);
errcount ++;
}
else if(i==2)
{
printf("%s(%d): syntax error: checkintsection function parameter1 need a int-type parameter \n",filename,lineno);
errcount ++;
}
i = lookstringtable($7);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$7);
errcount ++;
}
else if(i==2)
{
printf("%s(%d): syntax error: checkintsection function parameter3 need a int-type parameter \n",filename,lineno);
errcount ++;
}
if(assigntype!=0)
{
printf("%s(%d): syntax error: checkintsection type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\t%s\t%d\t%s\n",outlineno++,looktokentable(CHECKINTSECTION3),$3,$5,$7);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\t%d\t%s\n",outlineno,CHECKINTSECTION3,$3,$5,$7);
}
} |
CHECKINTSECTION LEFTC ID ',' NUMBER ',' NUMBER RIGHTC
{
int i;
i = lookstringtable($3);
if(i==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$3);
errcount ++;
}
else if(i==2)
{
printf("%s(%d): syntax error: checkintsection function parameter1 need a int-type parameter \n",filename,lineno);
errcount ++;
}
if(assigntype!=0)
{
printf("%s(%d): syntax error: checkintsection type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -