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.

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.