if (digit(ch))
{
while(digit(ch))
{
sum=sum*10+ch-'0';
token[m++]=ch ;
ch=prog[p++];
}
syn=11;
if(ch=='.')
{
token[m++]=ch ;
ch=prog[p++];
int k=1;
if (digit(ch))
{
while(digit(ch))
{
sum1=sum1+pow(0.1,k)*(ch-'0');
k++;
token[m++]=ch ;
ch=prog[p++];
}
}
else
syn=-1;
}
sum=sum+sum1;
if (ch=='e')
{
token[m++]=ch ;
ch=prog[p++];
if (digit(ch))
{
while(digit(ch))
{
sum2=sum2*10+ch-'0';
token[m++]=ch ;
ch=prog[p++];
}
sum=sum*pow(10.0,sum2);
syn=11;
}
else if (ch=='-')
{
token[m++]=ch ;
ch=prog[p++];
if (digit(ch))
{
while(digit(ch))
{
sum2=sum2*10+ch-'0';
token[m++]=ch ;
ch=prog[p++];
}
sum=sum/pow(10.0,sum2);
syn=11;
}
else
syn=-1;
}
else if (ch=='+')
{
token[m++]=ch ;
ch=prog[p++];
if (digit(ch))
{
while(digit(ch))
{
sum2=sum2*10+ch-'0';
token[m++]=ch ;
ch=prog[p++];
}
sum=sum*pow(10.0,sum2);
syn=11;
}
else
syn=-1; }
else
syn=-1;
}
p--; }I
{
while(digit(ch))
{
sum=sum*10+ch-'0';
token[m++]=ch ;
ch=prog[p++];
}
syn=11;
if(ch=='.')
{
token[m++]=ch ;
ch=prog[p++];
int k=1;
if (digit(ch))
{
while(digit(ch))
{
sum1=sum1+pow(0.1,k)*(ch-'0');
k++;
token[m++]=ch ;
ch=prog[p++];
}
}
else
syn=-1;
}
sum=sum+sum1;
if (ch=='e')
{
token[m++]=ch ;
ch=prog[p++];
if (digit(ch))
{
while(digit(ch))
{
sum2=sum2*10+ch-'0';
token[m++]=ch ;
ch=prog[p++];
}
sum=sum*pow(10.0,sum2);
syn=11;
}
else if (ch=='-')
{
token[m++]=ch ;
ch=prog[p++];
if (digit(ch))
{
while(digit(ch))
{
sum2=sum2*10+ch-'0';
token[m++]=ch ;
ch=prog[p++];
}
sum=sum/pow(10.0,sum2);
syn=11;
}
else
syn=-1;
}
else if (ch=='+')
{
token[m++]=ch ;
ch=prog[p++];
if (digit(ch))
{
while(digit(ch))
{
sum2=sum2*10+ch-'0';
token[m++]=ch ;
ch=prog[p++];
}
sum=sum*pow(10.0,sum2);
syn=11;
}
else
syn=-1; }
else
syn=-1;
}
p--; }I