首页 | 本学科首页   官方微博 | 高级检索  
     


On the prediction of reduction goals: a deterministic approach
Affiliation:1. Department of Information and Computing Sciences, Utrecht University, Utrecht, 3584 CC, Netherlands;2. Bernoulli Institute, University of Groningen, Groningen, 9747 AG, Netherlands;3. Institute of Mathematics and Statistics, University of São Paulo, São Paulo 05508-090, Brazil
Abstract:In LR parsing, a reduction goal is known at reduction time, but the goal can be sometimes found before that time. We recently proposed an algorithm generating pre-determinable reduction goals during LR parsing. On the other hand, the method requires a parser constructor to select a goal among a set of pre-determinable reduction goals. The non-deterministic set approach is hence inadequate to be used in an automatic parser generating system.This paper presents a deterministic approach such that a unique predicted goal is generated. The crux of the approach lies in preserving all the prediction information. We prove that all the predicted goals are orderable by the number of parsing actions required before a reduction occurs from the current parsing configuration. Based on the property, we propose the strategy choosing the nearest goal from the current parsing configuration as a way to impose determinism. This paper lastly shows the usefulness of the proposed approach in error handing applications of pre-determinable reduction goals.
Keywords:
本文献已被 ScienceDirect 等数据库收录!
设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号