Vous pouvez vous abonner à nos annonces de séminaires http://gallium.inria.fr/seminaires/ S E M I N A I R E __ / _` _ / / o / ) __) / / / / / /\/| (___/ (_/ (_ (_ / (__/ / | I N R I A - Paris 2 rue Simone Iff (ou: 41 rue du Charolais) Salle Lions 1, bâtiment C Lundi 15 février, 10h30 ----------------- François Pottier ----------------- INRIA ==================================================== Can an LR parser produce good syntax error messages? ==================================================== Can an LR parser produce good syntax error messages? Jeffery (2003) suggests manually building a collection of erroneous input sentences, accompanied with hand-written diagnostic messages. A key difficulty, however, is to ensure that this collection covers every error state, and to maintain this property as the grammar evolves. This requires answering the following questions: 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? I will describe an algorithm that answers these questions, and which I have implemented in Menhir. I will discuss how, thanks to this algorithm, I have been able to apply Jeffery's technique to the CompCert ISO C99 parser. I will explain why it is sometimes impossible to come up with an accurate diagnostic message based on the current state alone (ignoring the stack) and how I have worked around this problem.