摘要
针对标准C++语言中的函数重载机制,提出一种设计方法,解决编译器前端构建中重载函数的解析。文中首先阐述了重载的概念和解析的基本过程,其次讨论了语法分析器、文法产生式、符号表、抽象语法树四者在处理函数重载时的相互关系。最后详细介绍了重载函数的存储、名字解析、重载解析的方法。
Based on the standard C ++, this paper aims to design a method to solve the problem of function overload resolution during the construction of the compiler. First, this paper introduces the concept and basic procedure of the function overload, and then discusses the relationship among parser, grammar, symbol table and abstract syntax tree in overload resolution. Finally, it discusses the method of storage, name resolution and overload resolution in detail.
出处
《电子科技》
2009年第2期28-32,共5页
Electronic Science and Technology
基金
武器装备预研基金资助项目(51406070101DZ0151)
关键词
标准C++
编译器
重载函数解析
符号表
抽象语法树
standard C ++
compiler
overloaded function resolution
symbol table
abstract syntax tree