Balaji Viswanathan Iyer <[EMAIL PROTECTED]> writes:

>      I am trying to understand GCC further, and I would like to know how
> GCC calls the parser from the main function in gcc.c.

The gcc driver execs another program, which for C is called cc1.  The
main function in cc1 winds up calling the parser.  To see how, run gcc
-v to see how cc1 is invoked, and run gdb on cc1, set a breakpoint,
and do a backtrace.

> I looked at the
> YACC/BISON file and found that c_parse_file called yyparse().

Note that this is gone in current gcc sources.  The parser has been
rewritten to use recursive descent rather than bison.

Ian

Reply via email to