Improved GLR parsing algorithm

  • Authors:
  • Miao Li;ZhiGuo Wei;Jian Zhang;ZeLin Hu

  • Affiliations:
  • Institute of Intelligent Machines, Chinese Academy of Sciences, Hefei Anhui, P.R.China;Institute of Intelligent Machines, Chinese Academy of Sciences, Hefei Anhui, P.R.China;Institute of Intelligent Machines, Chinese Academy of Sciences, Hefei Anhui, P.R.China;Institute of Intelligent Machines, Chinese Academy of Sciences, Hefei Anhui, P.R.China

  • Venue:
  • ICIC'05 Proceedings of the 2005 international conference on Advances in Intelligent Computing - Volume Part II
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

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.