Abstract

Tomita devised a method of generalized LR(GLR) parsing to parse ambiguous grammars efficiently. A GLR parser uses linear-time LR parsing techniques as long as possible, falling back on more expensive general techniques when necessary. In this paper, the motivation of adopting the GLR parsing algorithm to construct parsers for programming languages is presented. We create a multi-level scheme to fasten the GLR parser. We introduce runtime control mechanisms to the GLR parser to invoke semantic actions attached to grammar rules. The algorithm has been implemented in Development Expert Tools (DET), a compiler which is designed by Institute of Intelligent Machines, Chinese Academy of Sciences, at Hefei. Experiments show that the speed of our GLR parser is comparable to LALR(1) parsers when parsing deterministic programming languages.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.