Building efficient incremental LL parser by augmenting LL table and threading parse tree

ACM-SE 33 Pub Date : 1995-03-17 DOI:10.1145/1122018.1122071
W. Li
{"title":"Building efficient incremental LL parser by augmenting LL table and threading parse tree","authors":"W. Li","doi":"10.1145/1122018.1122071","DOIUrl":null,"url":null,"abstract":"Incremental parsing is widely used in syntax-directed editors and incremental compilation and interpretive environments. Reparsing of modified input strings is the most frequently performed operation in these environments and its efficiency can greatly affect the success of such environments. Incremental parsers attempt to minimize the reparsing process when a change from an input string xyz to xy'z is made. A number of algorithms have been proposed for LR incremental parsers, but few have been proposed for LL incremental parsers [1, 2]. Both of the LL-based algorithms in these papers attempt to minimize the reparsing on the original parse tree and the parse table. From this point of view, both algorithms have a limit on their maximum attempt. On the contrary to their approaches, we introduce a threaded link in the parse tree (termed threaded parse tree) and an additional entry, distance, in the LL parse table (termed augmented LL parse table). A more efficient LL parser based on the threaded parse tree and augmented LL table has then been developed. This parser benefits greatly from its maximal reuse of its previously established parse tree and its earliest possible detection of unnecessary reparsing. The algorithm presented works optimally over block and right-recursive list structured languages as these are its unit of consideration for the reuse.","PeriodicalId":349974,"journal":{"name":"ACM-SE 33","volume":"18 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1995-03-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"ACM-SE 33","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1122018.1122071","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Incremental parsing is widely used in syntax-directed editors and incremental compilation and interpretive environments. Reparsing of modified input strings is the most frequently performed operation in these environments and its efficiency can greatly affect the success of such environments. Incremental parsers attempt to minimize the reparsing process when a change from an input string xyz to xy'z is made. A number of algorithms have been proposed for LR incremental parsers, but few have been proposed for LL incremental parsers [1, 2]. Both of the LL-based algorithms in these papers attempt to minimize the reparsing on the original parse tree and the parse table. From this point of view, both algorithms have a limit on their maximum attempt. On the contrary to their approaches, we introduce a threaded link in the parse tree (termed threaded parse tree) and an additional entry, distance, in the LL parse table (termed augmented LL parse table). A more efficient LL parser based on the threaded parse tree and augmented LL table has then been developed. This parser benefits greatly from its maximal reuse of its previously established parse tree and its earliest possible detection of unnecessary reparsing. The algorithm presented works optimally over block and right-recursive list structured languages as these are its unit of consideration for the reuse.
通过扩展LL表和线程解析树构建高效的增量LL解析器
增量解析广泛应用于语法导向编辑器和增量编译和解释环境中。重新解析修改后的输入字符串是这些环境中最常执行的操作,其效率会极大地影响此类环境的成功。增量解析器试图在将输入字符串xyz更改为xy'z时尽量减少重新解析过程。已经为LR增量解析器提出了许多算法,但很少有针对LL增量解析器提出的算法[1,2]。本文中两种基于语言的算法都试图最小化对原始解析树和解析表的重新解析。从这个角度来看,两种算法都有其最大尝试次数的限制。与他们的方法相反,我们在解析树(称为线程解析树)中引入了一个线程链接,并在LL解析表(称为增强LL解析表)中引入了一个额外的条目,即距离。然后开发了基于线程解析树和增强的LL表的更有效的LL解析器。该解析器最大限度地重用其先前建立的解析树,并尽可能早地检测不必要的重新解析,这使它受益匪浅。该算法在块结构语言和右递归列表结构语言上最优地工作,因为它们是其重用的考虑单元。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信