Reachability and error diagnosis in LR(1) parsers

4 years 10 months ago
Reachability and error diagnosis in LR(1) parsers
Given an LR(1) automaton, what are the states in which an error can be detected? For each such “error state”, what is a minimal input sentence that causes an error in this state? We propose an algorithm that answers these questions. This allows building a collection of pairs of an erroneous input sentence and a (handwritten) diagnostic message, ensuring that this collection covers every error state, and maintaining this property as the grammar evolves. We report on an application of this technique to the CompCert ISO C99 parser, and discuss its strengths and limitations. Categories and Subject Descriptors D.3.4 [Programming Languages]: Processors—Parsing Keywords Compilers, parsing, error diagnosis, reachability
François Pottier
Added 31 Mar 2016
Updated 31 Mar 2016
Type Journal
Year 2016
Where CC
Authors François Pottier
Comments (0)