为BNF语法生成解析器

F. DeRemer
{"title":"为BNF语法生成解析器","authors":"F. DeRemer","doi":"10.1145/1476793.1476928","DOIUrl":null,"url":null,"abstract":"The procedure described herein is in essence an extension, albeit a simplification, of the work Earley which in turn was based on Evans, Feldman, Floyd, and Standish. For a large subset of grammars, the procedure maps the Backus Naur Form (BNF) definition of the grammar of a language into a deterministic, left-to-right parser for the sentences in that language. It is shown below that the procedure by design, covers all bounded right context grammars and, as a by-product, some LR(k) grammars which are not bounded right context. See Knuth for the definitions of these classes of grammars. If two parameters are incorporated a priori into the procedure, one limiting the look-back and the other limiting the look-ahead capabilities of the parser to be generated, an algorithm results. For each BNF grammar G the algorithm either rejects G as not bounded right context for the specified limits or it generates a parser for G.","PeriodicalId":326625,"journal":{"name":"AFIPS '69 (Spring)","volume":"70 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1969-05-14","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"6","resultStr":"{\"title\":\"Generating parsers for BNF grammars\",\"authors\":\"F. DeRemer\",\"doi\":\"10.1145/1476793.1476928\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"The procedure described herein is in essence an extension, albeit a simplification, of the work Earley which in turn was based on Evans, Feldman, Floyd, and Standish. For a large subset of grammars, the procedure maps the Backus Naur Form (BNF) definition of the grammar of a language into a deterministic, left-to-right parser for the sentences in that language. It is shown below that the procedure by design, covers all bounded right context grammars and, as a by-product, some LR(k) grammars which are not bounded right context. See Knuth for the definitions of these classes of grammars. If two parameters are incorporated a priori into the procedure, one limiting the look-back and the other limiting the look-ahead capabilities of the parser to be generated, an algorithm results. For each BNF grammar G the algorithm either rejects G as not bounded right context for the specified limits or it generates a parser for G.\",\"PeriodicalId\":326625,\"journal\":{\"name\":\"AFIPS '69 (Spring)\",\"volume\":\"70 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1969-05-14\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"6\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"AFIPS '69 (Spring)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/1476793.1476928\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"AFIPS '69 (Spring)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/1476793.1476928","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 6

摘要

这里描述的过程本质上是对Earley工作的扩展,尽管是简化,而Earley的工作又以Evans, Feldman, Floyd和Standish为基础。对于大量语法子集,该过程将语言语法的Backus Naur Form (BNF)定义映射到该语言中句子的确定性、从左到右的解析器。如下所示,该过程通过设计涵盖了所有有界右上下文语法,并且作为副产品,还涵盖了一些非有界右上下文的LR(k)语法。有关这些语法类的定义,请参阅Knuth。如果将两个参数先验地合并到过程中,一个限制回看,另一个限制要生成的解析器的预看功能,则生成一个算法。对于每个BNF语法G,该算法要么拒绝G作为指定限制的无界右上下文,要么为G生成一个解析器。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
Generating parsers for BNF grammars
The procedure described herein is in essence an extension, albeit a simplification, of the work Earley which in turn was based on Evans, Feldman, Floyd, and Standish. For a large subset of grammars, the procedure maps the Backus Naur Form (BNF) definition of the grammar of a language into a deterministic, left-to-right parser for the sentences in that language. It is shown below that the procedure by design, covers all bounded right context grammars and, as a by-product, some LR(k) grammars which are not bounded right context. See Knuth for the definitions of these classes of grammars. If two parameters are incorporated a priori into the procedure, one limiting the look-back and the other limiting the look-ahead capabilities of the parser to be generated, an algorithm results. For each BNF grammar G the algorithm either rejects G as not bounded right context for the specified limits or it generates a parser for G.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
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学术文献互助群
群 号:481959085
Book学术官方微信