检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
作 者:刘晓洪[1] 高海昌[1] 贺晓红[1] 冯博琴[1] 朱利[2]
机构地区:[1]西安交通大学电子与信息工程学院,陕西西安710049 [2]西安交通大学软件学院,陕西西安710049
出 处:《微电子学与计算机》2005年第5期166-169,共4页Microelectronics & Computer
基 金:国家863计划项目(2003AA1Z2610)
摘 要:为实现白盒测试的源文件信息提取,提出了通过lex和yacc对使用上下文无关文法定义的语言进行词法和语法分析,构建独立的信息提取模块。该方法首先构建测试语言符合yacc规范的完整的文法体系,并将整个文法体系逻辑上划分为类文法和函数文法两大主要部分来处理。函数信息提取部分通过块和级的思想,用语句结构和语句链表结构将函数定义信息表示出来。然后将这些结构信息存入数据库,以供其它模块使用,充分做到了模块独立.这样只需要设计不同的信息提取模块,就可以实现各种上下文无关文法定义的语言的白盒测试。Lex and yacc were used to analyze the lexis and grammar of the languages defined by context-free grammars, and an independent information extracting module was build to extract the information of source files for white-box testing. The whole grammar system for a tested language accorded with the criterion of yacc is build, and the system is logically divided into two main parts, class grammar and function grammar. Sentence structure and sentence linked list structure express the function definition using block and level when they extract function information, then the structure information is put into the database to be used for other modules. Thus the modules are completely independent. In this way, only by designing different information extraction modules, various context-free grammar languages for white-box testing can be realized.
关 键 词:自盒测试 上下文无关文法 C++ 词法分析 语法分析 类 函数
分 类 号:TP393.06[自动化与计算机技术—计算机应用技术]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:216.73.216.15