D
Divick
Hi all,
can anyone tell me what kind of parser is used to parse C++
language i.e. LALR or LL (k?) ? Or is it implementation dependent?
The reason for this question is that I was trying to figure out what
the output of the following program be:
int main()
{
int a = 10;
printf("%d %d %d\n",++a,a++,a);
return 0;
}
and I am getting two different results on two different compilers. Can
one definitely answer based on how the laguage is parsed (lef to right
or right to left) to tell the output of the above program?
Thanks,
Divick
can anyone tell me what kind of parser is used to parse C++
language i.e. LALR or LL (k?) ? Or is it implementation dependent?
The reason for this question is that I was trying to figure out what
the output of the following program be:
int main()
{
int a = 10;
printf("%d %d %d\n",++a,a++,a);
return 0;
}
and I am getting two different results on two different compilers. Can
one definitely answer based on how the laguage is parsed (lef to right
or right to left) to tell the output of the above program?
Thanks,
Divick