{"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.