程序代码相似度度量中词法分析器的设计实现  

Design and Implementation of Lexical Analyzer in Program Source Code Similarity Measurement

在线阅读下载全文

作  者:于海英[1] 

机构地区:[1]内蒙古财经大学计算机信息管理学院,内蒙古呼和浩特010070

出  处:《电子科技》2015年第12期110-113,共4页Electronic Science and Technology

基  金:内蒙古自治区高等学校科学研究基金资助项目(NJZY13200)

摘  要:针对程序代码相似度度量中的词法分析问题,提出了一种基于语言词典的词法分析器的设计和实现方案。通过对程序源码进行预处理,将其转换为一个字符串,然后对该字符串逐字符进行分解,得到构成源代码的每一个标识符Token,并判断其类型,实现对程序源码的词法分析。实验结果表明,该方法能有效分析程序源码的词汇构成情况。A design and implementation scheme of lexical analyzer based on language dictionary is proposed for lexical analysis in program source code similarity measurements. The program source codes are converted first into a string,which is decomposed character by character to obtain each token of the program source codes,whose type is judged for lexical analysis. Experimental results show the scheme can effectively analyze the lexical structure of the program source codes.

关 键 词:词法分析器 标识符Token 语言词典 源码分析 

分 类 号:TP311.11[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象