Abstract
The MINLRl algorithm for finding minimal deterministic parsers for LR(1) grammars is presented. MINLRl also detects whether a grammar is LR(l) with little more work than building the grammar's LALR(l) parser. MINLRl starts by building the characteristic finite state machine, CFSM, for the input grammar and then checks for LR(l)ness. If the input grammar is LR(l), MINLRl transforms the CFSM into a minimal LR(l) parser by creating extra copies of certain states of the CFSM as necessary. The complexity of the algorithm is O(n3l2v2) where n is the number of states in the parser, l is the size of the input grammar and v is the number of symbols in the input grammar. Minimal is defined as not being a proper refinement of any deterministic LR-parser.
Recommended Citation
Sager, Thomas J., "The MINLRl Algorithm for Generating Small LR(l) Parsers" (1991). Computer Science Technical Reports. 102.
https://scholarsmine.mst.edu/comsci_techreports/102
Department(s)
Computer Science
Keywords and Phrases
LR(l) grammars, LR(l) parsing
Report Number
CSc-91-20
Document Type
Technical Report
Document Version
Final Version
File Type
text
Language(s)
English
Rights
© 1991 University of Missouri - Rolla, All rights reserved
Publication Date
10 November 1991

Comments
This paper has been submitted for publication to the IEEE Computer Society 1992 International Conference on Computer Languages to be held in April 1992.