gcc编译器中c_parser_attributes函数的总体分析

可以从总体上,大概了解c_parser_attributes函数的执行内容。

// 
// ------------------------------------------------------
// | c_parser_attributes()                              |* ---- 解读(跳过) (属性名ATTR_id_name和其系列属性参数ATTR_list_arg的)属性指定项ATTR_list【__attribute__((属性名(系列属性参数), 属性名, ...)) ...】
// |                                                    |
// |   while( __attribute__关键字标号RID_ATTRIBUTE )      |
// |                                                    |
// |     (属性内容)开始 ---- 2个左括号CPP_OPEN_PAREN       |
// |                                                    |
// |       (各个属性指定项)间隔 ---- 逗号CPP_COMMA          |
// |                                                    |
// |       ---------------------------------------      |
// |       c_parser_attribute_any_word()                |* ---- 解读 属性名ATTR_id_name: 来自 标识名字CPP_NAME 关键字CPP_KEYWORD 
// |                                                    |
// |       (系列属性参数)开始 ---- 左括号CPP_OPEN_PAREN    |* ---- 解读 系列属性参数ATTR_list_arg: 来自 CPP_NAME通常标识符C_ID_ID 
// |                                                    |
// |       c_parser_expr_list()                         |* ---- 解读 属性参数值tree_vec 
// |       build_tree_list_vec()                        |
// |                                                    |
// |       build_tree_list()                            |  ---- 构建 (属性名ATTR_id_name和其系列属性参数ATTR_list_arg的)某个属性指定项ATTR_list 
// |                                                    |
// |       (系列属性参数)结束 ---- 右括号CPP_CLOSE_PAREN   |
// |                                                    |
// |       chainon()                                    |* ---- 加入 (属性名ATTR_id_name和其系列属性参数ATTR_list_arg的)某个属性指定项ATTR_list 
// |                                                    |
// |     -----------------------------------------      |
// |     (属性内容)结束 ---- 2个左括号CPP_OPEN_PAREN       |
// |                                                    |
// ------------------------------------------------------
// 

猜你喜欢

转载自blog.csdn.net/weixin_44285036/article/details/107714075
今日推荐