{"title":"用于优化回溯解析器的语法转换","authors":"Janos J. Sarbo","doi":"10.1016/0096-0551(94)90016-7","DOIUrl":null,"url":null,"abstract":"<div><p>We present two grammar transformations which can decrease the search space of generated top-down backtrack parsers. The transformations are simple and can be of practical use.</p><p>The first transformation, which is a combination of substitution and left-factorization, is based on the LR-table construction. The second transformation uses the calculation of the sets <em>FIRST</em> and <em>FOLLOW</em>, and a grammar property, called <em>rrelative unambiguity</em>.</p><p>The time complexity of the transformations is worst case polynomial and in practical cases linear in the size of the grammar.</p></div>","PeriodicalId":100315,"journal":{"name":"Computer Languages","volume":"20 2","pages":"Pages 89-100"},"PeriodicalIF":0.0000,"publicationDate":"1994-05-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/0096-0551(94)90016-7","citationCount":"5","resultStr":"{\"title\":\"Grammar transformations for optimizing backtrack parsers\",\"authors\":\"Janos J. Sarbo\",\"doi\":\"10.1016/0096-0551(94)90016-7\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><p>We present two grammar transformations which can decrease the search space of generated top-down backtrack parsers. The transformations are simple and can be of practical use.</p><p>The first transformation, which is a combination of substitution and left-factorization, is based on the LR-table construction. The second transformation uses the calculation of the sets <em>FIRST</em> and <em>FOLLOW</em>, and a grammar property, called <em>rrelative unambiguity</em>.</p><p>The time complexity of the transformations is worst case polynomial and in practical cases linear in the size of the grammar.</p></div>\",\"PeriodicalId\":100315,\"journal\":{\"name\":\"Computer Languages\",\"volume\":\"20 2\",\"pages\":\"Pages 89-100\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1994-05-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"https://sci-hub-pdf.com/10.1016/0096-0551(94)90016-7\",\"citationCount\":\"5\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Computer Languages\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/0096055194900167\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Computer Languages","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/0096055194900167","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Grammar transformations for optimizing backtrack parsers
We present two grammar transformations which can decrease the search space of generated top-down backtrack parsers. The transformations are simple and can be of practical use.
The first transformation, which is a combination of substitution and left-factorization, is based on the LR-table construction. The second transformation uses the calculation of the sets FIRST and FOLLOW, and a grammar property, called rrelative unambiguity.
The time complexity of the transformations is worst case polynomial and in practical cases linear in the size of the grammar.