On 02/17/2010 04:50 AM, dib.cool...@gmail.com wrote: > hi... > I am a student of b.sc first yr in comp.science.... > can you tell me > > which parsing technique is used in ANSI c language and in gcc?
A hand-written recursive descent parser. It's in gcc/c-parse.c. > and how the parse tree is generated in parsing phase? > For instance if a code fragment is : > > #include<stdio.h> > > > int main(){ > > int a[50],i; > for (i=0;i<50;i++) > > scanf("%d",a[i]); > > for(i=0;i<50;i++) > printf("%d",a[i]); > > return 0; > } > > > how C will generate his parse tree for this code? Have a look: the source is public. Andrew.