📄 test30.y
字号:
int i=0;
if(assigntype!=0)
{
printf("%s(%d): syntax error: getconfnomembers type conflict \n",filename,lineno);
errcount ++;
}
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: getconfnomembers function need a int-type parameter \n",filename,lineno);
errcount++;
}
if(ofiletype==1)
fprintf(yyout,"%5d:%10s\t%s\n",outlineno++,looktokentable(GETCONFNOMEMBERS1),$3);
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\n",outlineno,GETCONFNOMEMBERS1,$3);
}
}
|
GETCONFNOMEMBERS LEFTC NUMBER RIGHTC
{
if(assigntype!=0)
{
printf("%s(%d): syntax error: getconfnomembers type conflict \n",filename,lineno);
errcount++;
}
if(ofiletype==1)
fprintf(yyout,"%5d:%10s\t%d\n",outlineno++,looktokentable(GETCONFNOMEMBERS2),$3);
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%d\n",outlineno,GETCONFNOMEMBERS2,$3);
}
}
|
ITOS LEFTC ID RIGHTC
{
int i=0;
if(assigntype!=1)
{
printf("%s(%d): syntax error: itos type conflict \n",filename,lineno);
errcount ++;
}
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: itos function need a int-type parameter \n",filename,lineno);
errcount++;
}
if(ofiletype==1)
fprintf(yyout,"%5d:%10s\t%s\n",outlineno++,looktokentable(ITOS1),$3);
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\n",outlineno,ITOS1,$3);
}
}
|
ITOS LEFTC NUMBER RIGHTC
{
if(assigntype!=1)
{
printf("%s(%d): syntax error: itos type conflict \n",filename,lineno);
errcount++;
}
if(ofiletype==1)
fprintf(yyout,"%5d:%10s\t%d\n",outlineno++,looktokentable(ITOS2),$3);
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%d\n",outlineno,ITOS2,$3);
}
}
|
STOI LEFTC ID RIGHTC
{
int i=0;
if(assigntype!=0)
{
printf("%s(%d): syntax error: stoi type conflict \n",filename,lineno);
errcount ++;
}
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: stoi function need a string-type parameter\n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
fprintf(yyout,"%5d:%10s\t%s\n",outlineno++,looktokentable(STOI1),$3);
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\n",outlineno,STOI1,$3);
}
}
|
STOI LEFTC STR RIGHTC
{
if(assigntype!=0)
{
printf("%s(%d): syntax error: stoi type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\n",outlineno++,looktokentable(STOI2));
fprintf(yyout,"%5d:%s\n",outlineno++,$3);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\n",outlineno,STOI2);
outlineno++;
fprintf(yyout,"%5d:\t%s\n",outlineno,$3);
}
}
|
DATEDIFF LEFTC ID',' ID ',' ID RIGHTC
{
int i;
if(assigntype!=0)
{
printf("%s(%d): syntax error: stoi type conflict \n",filename,lineno);
errcount ++;
}
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: datediff 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==1)
{
printf("%s(%d): syntax error: datediff function parameter2 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==1)
{
printf("%s(%d): syntax error: datediff function parameter3 need a string-type parameter \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
fprintf(yyout,"%5d:%10d\t%s\t%s\t%s\n",outlineno++,looktokentable(DATEDIFF1),$3,$5,$7);
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\t%s\t%s\n",outlineno,DATEDIFF1,$3,$5,$7);
}
}
|
DATEDIFF LEFTC ID ',' ID ',' STR RIGHTC
{
int result=lookstringtable($3);
if(assigntype!=0)
{
printf("%s(%d): syntax error: stoi type conflict \n",filename,lineno);
errcount ++;
}
if(result==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$3);
errcount ++;
}
else if(result==2)
{
printf("%s(%d): syntax error: datediff function parameter1 need a int-type parameter \n",filename,lineno);
errcount ++;
}
result=lookstringtable($5);
if(result==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$5);
errcount ++;
}
else if(result==1)
{
printf("%s(%d): syntax error: datediff function parameter2 need a string-type parameter \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\t%s\t%s\n",outlineno++,looktokentable(DATEDIFF2),$3,$5);
fprintf(yyout,"%5d:\t%s\n",outlineno++,$7);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\t%s\n",outlineno,DATEDIFF2,$3,$5);
outlineno++;
fprintf(yyout,"%5d:\t%s\n",outlineno,$7);
}
} |
DATEDIFF LEFTC ID ',' STR ',' ID RIGHTC
{
int result=lookstringtable($3);
if(assigntype!=0)
{
printf("%s(%d): syntax error: stoi type conflict \n",filename,lineno);
errcount ++;
}
if(result==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$3);
errcount ++;
}
else if(result==2)
{
printf("%s(%d): syntax error: datediff function parameter1 need a int-type parameter \n",filename,lineno);
errcount ++;
}
result=lookstringtable($7);
if(result==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$7);
errcount ++;
}
else if(result==1)
{
printf("%s(%d): syntax error: datediff function parameter3 need a string-type parameter \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\t%s\t%s\n",outlineno++,looktokentable(DATEDIFF3),$3,$7);
fprintf(yyout,"%5d:\t%s\n",outlineno++,$5);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\t%s\n",outlineno,DATEDIFF3,$3,$7);
outlineno++;
fprintf(yyout,"%5d:\t%s\n",outlineno,$5);
}
} |
DATEDIFF LEFTC ID ',' STR ',' STR RIGHTC
{
int result=lookstringtable($3);
if(assigntype!=0)
{
printf("%s(%d): syntax error: stoi type conflict \n",filename,lineno);
errcount ++;
}
if(result==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$3);
errcount ++;
}
else if(result==2)
{
printf("%s(%d): syntax error: datediff function parameter1 need a int-type parameter \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\t%s\n",outlineno++,looktokentable(DATEDIFF4),$3);
fprintf(yyout,"%5d:\t%s\n",outlineno++,$5);
fprintf(yyout,"%5d:\t%s\n",outlineno++,$7);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\n",outlineno,DATEDIFF4,$3);
outlineno++;
fprintf(yyout,"%5d:\t%s\n",outlineno,$5);
outlineno++;
fprintf(yyout,"%5d:\t%s\n",outlineno,$7);
}
}
|
DATEDIFF LEFTC NUMBER ',' ID ',' ID RIGHTC
{
int result=lookstringtable($5);
if(assigntype!=0)
{
printf("%s(%d): syntax error: stoi type conflict \n",filename,lineno);
errcount ++;
}
if(result==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$5);
errcount ++;
}
else if(result==1)
{
printf("%s(%d): syntax error: datediff function parameter2 need a string-type parameter \n",filename,lineno);
errcount ++;
}
result=lookstringtable($7);
if(result==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$7);
errcount ++;
}
else if(result==1)
{
printf("%s(%d): syntax error: datediff function parameter3 need a string-type parameter \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10d\t%d\t%s\t%s\n",outlineno++,looktokentable(DATEDIFF5),$3,$5,$7);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%d\t%s\t%s\n",outlineno,DATEDIFF5,$3,$5,$7);
}
}
|
DATEDIFF LEFTC NUMBER ',' ID ',' STR RIGHTC
{
int result=lookstringtable($5);
if(assigntype!=0)
{
printf("%s(%d): syntax error: stoi type conflict \n",filename,lineno);
errcount ++;
}
if(result==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$5);
errcount ++;
}
else if(result==1)
{
printf("%s(%d): syntax error: datediff function parameter2 need a string-type parameter \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10d\t%d\t%s\n",outlineno++,looktokentable(DATEDIFF6),$3,$5);
fprintf(yyout,"%5d:\t%s\n",outlineno++,$7);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%d\t%s\n",outlineno,DATEDIFF6,$3,$5);
outlineno++;
fprintf(yyout,"%5d:\t%s\n",outlineno,$7);
}
}
|
DATEDIFF LEFTC NUMBER ',' STR ',' ID RIGHTC
{
int result=lookstringtable($7);
if(assigntype!=0)
{
printf("%s(%d): syntax error: stoi type conflict \n",filename,lineno);
errcount ++;
}
if(result==0)
{
printf("%s(%d): syntax error: undeclared identifier '%s' \n",filename,lineno,$5);
errcount ++;
}
else if(result==1)
{
printf("%s(%d): syntax error: datediff function parameter3 need a string-type parameter \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10d\t%d\t%s\n",outlineno++,looktokentable(DATEDIFF7),$3,$7);
fprintf(yyout,"%5d:\t%s\n",outlineno++,$5);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%d\t%s\n",outlineno,DATEDIFF7,$3,$7);
outlineno++;
fprintf(yyout,"%5d:\t%s\n",outlineno,$5);
}
} |
DATEDIFF LEFTC NUMBER ',' STR ',' STR RIGHTC
{
if(assigntype!=0)
{
printf("%s(%d): syntax error: stoi type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10d\t%d\n",outlineno++,looktokentable(DATEDIFF8),$3);
fprintf(yyout,"%5d:\t%s\n",outlineno++,$5);
fprintf(yyout,"%5d:\t%s\n",outlineno++,$7);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%d\n",outlineno,DATEDIFF8,$3);
outlineno++;
fprintf(yyout,"%5d:\t%s\n",outlineno,$5);
outlineno++;
fprintf(yyout,"%5d:\t%s\n",outlineno,$7);
}
}
|
GETFIELDVALUE LEFTC STR RIGHTC
{
if(assigntype!=1)
{
printf("%s(%d): syntax error: getfieldvalue type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\n",outlineno++,looktokentable(GETFIELDVALUE1));
fprintf(yyout,"%5d:%s\n",outlineno++,$3);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%s\n",outlineno,GETFIELDVALUE1);
outlineno++;
fprintf(yyout,"%5d:\t%s\n",outlineno,$3);
}
} |
GETFIELDVALUE LEFTC NUMBER RIGHTC
{
if(assigntype!=1)
{
printf("%s(%d): syntax error: getfieldvalue type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\t%d\n",outlineno++,looktokentable(GETFIELDVALUE2),$3);
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\t%d\n",outlineno,GETFIELDVALUE2,$3);
}
} |
GETAFFECTEDROW LEFTC RIGHTC
{
if(assigntype!=0)
{
printf("%s(%d): syntax error: getfieldvalue type conflict \n",filename,lineno);
errcount ++;
}
if(ofiletype==1)
{
fprintf(yyout,"%5d:%10s\n",outlineno++,looktokentable(GETAFFECTEDROW1));
}
else
{
outlineno++;
fprintf(yyout,"%5d:\t%5d\n",outlineno,GETAFFECTEDROW1);
}
} |
GETUSEDSECONDS LEFTC RIGHTC
{
if(assigntype!=0)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -