|
|
|
@ -119,7 +119,7 @@ Precedence *loadPrec(int *tmax, int *tlog)
|
|
|
|
|
FILE *prec;
|
|
|
|
|
Precedence *tabP, *s;
|
|
|
|
|
char *precSuccStr;
|
|
|
|
|
int index=0;
|
|
|
|
|
int index;
|
|
|
|
|
prec=fopen("files/precedences.txt", "r");
|
|
|
|
|
(*tmax)=0;
|
|
|
|
|
(*tlog)=0;
|
|
|
|
@ -138,6 +138,7 @@ Precedence *loadPrec(int *tmax, int *tlog)
|
|
|
|
|
precSuccStr = readFromFile(prec);
|
|
|
|
|
while(!feof(prec))
|
|
|
|
|
{
|
|
|
|
|
index=0;
|
|
|
|
|
printf("%s\n", precSuccStr);
|
|
|
|
|
if((*tlog)==(*tmax))
|
|
|
|
|
{
|
|
|
|
@ -150,19 +151,20 @@ Precedence *loadPrec(int *tmax, int *tlog)
|
|
|
|
|
}
|
|
|
|
|
tabP = s;
|
|
|
|
|
}
|
|
|
|
|
printf("HI\n");
|
|
|
|
|
while (precSuccStr[index] != '\t')
|
|
|
|
|
index++;
|
|
|
|
|
|
|
|
|
|
printf("HELLO\n");
|
|
|
|
|
strcpy(tabP[*tlog].travauxSucc, precSuccStr+index+1);
|
|
|
|
|
precSuccStr[index]='\0';
|
|
|
|
|
strcpy(tabP[*tlog].travauxPrec, precSuccStr);
|
|
|
|
|
|
|
|
|
|
printf("HI\n");
|
|
|
|
|
precSuccStr = readFromFile(prec);
|
|
|
|
|
|
|
|
|
|
(*tlog)++;
|
|
|
|
|
printf("HELLO\n");
|
|
|
|
|
}
|
|
|
|
|
printf("HI\n");
|
|
|
|
|
free(precSuccStr);
|
|
|
|
|
fclose(prec);
|
|
|
|
|
return tabP;
|
|
|
|
|