首页 | 本学科首页   官方微博 | 高级检索  
     

一种LR语法分析中的错误恢复方法
引用本文:肖洋,姜淑娟.一种LR语法分析中的错误恢复方法[J].计算机工程,2007,33(4):193-195.
作者姓名:肖洋  姜淑娟
作者单位:中国矿业大学计算机科学与技术学院,徐州,221008
基金项目:中国矿业大学校科研和教改项目
摘    要:语法分析中的错误恢复是现代编译器中智能感知功能的重要组成部分,错误恢复的效果直接影响到智能感知功能的性能。在分析LR语法分析中LR分析表特性的基础上,提出了一种对LR分析表中的Goto表项进行改造来进行语法错误的诊断和恢复的方法。该方法充分利用了LR分析表中的空闲表项,在不增加空间需求的情况下,提高了语法错误的诊断和恢复的效率和准确率。

关 键 词:语法分析  编译器  智能  LR语法分析表  Action-Goto表
文章编号:1000-3428(2007)04-0193-03
修稿时间:2006-03-08

An Error Recovery Approach in LR Syntax Analysis
XIAO Yang,JIANG Shujuan.An Error Recovery Approach in LR Syntax Analysis[J].Computer Engineering,2007,33(4):193-195.
Authors:XIAO Yang  JIANG Shujuan
Affiliation:(School of Computer Science & Technology, China University of Mining & Technology, Xuzhou 221008)
Abstract:Error recovery in syntax analysis is one of the most important parts of the intelligence in the compiler.The effect of error recovery influences intelligence and syntax analysis.This paper presents a new method of modifying the items of Goto table in correcting syntax error based on analyzing the items of LR syntax analysis table.It uses the leisure items in LR syntax analysis table.It can improve the efficiency and precision in diagnosing and correcting syntax error without requiring more space.
Keywords:Syntax analysis  Compiler  Intelligence  LR syntax analysis table  Action-Goto table  
本文献已被 CNKI 维普 万方数据 等数据库收录!
点击此处可从《计算机工程》浏览原始摘要信息
点击此处可从《计算机工程》下载全文
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号