{"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}
引用次数: 6
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.