home | list info | list archive | date index | thread index

[OCLUG-Tech] Re: Parsing when compiling C - generalized understanding question?

  • Subject: [OCLUG-Tech] Re: Parsing when compiling C - generalized understanding question?
  • From: William Case <billlinux [ at ] rogers [ dot ] com>
  • Date: Thu, 29 Sep 2005 12:24:45 -0400
Hi;

I've done my homework; read the info, RedHat Manuals, googled and
searched Wikipedia regarding the gcc compiler.  I have gotten most of
the overview that I wanted.  However, I have one question that wasn't
answered, or if answered, I missed its importance.

I am trying to develop an overview understanding of what happens when
parsing any little C program I have written.  Where would I find the
rules that the parser uses to translate specific symbols?  For example,
I would like to see exactly what happens with the "{ }" braces or the
";" semi-colon when translated from source code to object code or
binary.  But my question is not only about those two symbols alone.  I
would like to be able to go to some source other than the ANSI C
Standards and see exactly how ANSI C is implemented by the parser (Flex
and/or Yacc ??).

Are source files the only place that the rules are explicitly laid out
for the parser?  If so, for gcc, which source files should I look in?

I have a couple of other short dumb questions about compiling. If
someone is willing to answer them they can email me directly and I will
send them to you?  I just think they might be boring for the people on
this list, and embarrassingly stupid for me.  To be honest, most of
these questions I could probably sort out for myself but I have already
spent more than a day on getting a compiling overview and a little help
would be gratefully received.

Regards Bill