终于调用的顺序清楚了,yyparse()函数调用了expand_expr_stmt()函数,expand_expr_stmt()函数调用了expand_expr()函数。
下面的语法规则对应printf("Hello,World!\n");。
stmt:
compstmt {}
| expr ';'
{ emit_line_note (input_filename, lineno);
/* Do default conversion if safe and possibly important,
in case within ({...}). */
if ((TREE_CODE (TREE_TYPE ($1)) == ARRAY_TYPE
&& lvalue_p ($1))
|| TREE_CODE (TREE_TYPE ($1)) == FUNCTION_TYPE)
$1 = default_conversion ($1);
expand_expr_stmt ($1);
clear_momentary (); }
/* Generate RTL to evaluate the expression EXP
and remember it in case this is the VALUE in a ({... VALUE; }) constr. */