eval_parser() (Part 2) & Misc. Parser functions.
By SalimMeghani
- 2558 reads
if (switc=='%' && texas[s-1]=='%')
{
putcalif('%');
break;
}
}
while (!(switc=='%' && texas[s-1]=='%'));
//
form3=(char *) calloc ((unsigned long)32767, sizeof(char));
find_brkt(error, calif,&start,&end,&bracket,&length);
//
if ((bracket) && (!*error))
{
eval_brkt(error, calif, &start, &end, &bracket, &length);
}
else
if (!*error)
{
strcpy(form3, calif);
}
if (!*error)
{
answer=eval_form(error, form3);
}
//
free(form3);
//
return answer;
}
//
void pushtexas(char switcd)
{
texas[s]=switcd;
s++;
x++;
switc=newyk[x];
}
void poptexas(int st1)
{
calif[c]=texas[st1];
s--;
c=c+1;
calif[c]=',';
c++;
//
}
//
void fpdel(void)
{
x++;
switc=newyk[x];
s--;
}
void putcalif(char switcd)
{
calif[c]=switcd;
c++;
x++;
switc=newyk[x];
}
void fperror(int *error)
{
*error=1;
}
void pushstk(double nu)
{
num[s]=nu;
s++;
}
double popstk()
{
s--;
return(num[s]);
}
- Log in to post comments