From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA28816 for caml-redistribution; Mon, 6 Sep 1999 18:20:02 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id OAA24222 for ; Mon, 6 Sep 1999 14:02:13 +0200 (MET DST) Received: from parasite.irisa.fr (parasite.irisa.fr [131.254.12.47]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id OAA23963 for ; Mon, 6 Sep 1999 14:02:12 +0200 (MET DST) Received: from parate.irisa.fr (parate.irisa.fr [131.254.12.25]) by parasite.irisa.fr (8.9.3/8.9.3) with ESMTP id OAA28375 for ; Mon, 6 Sep 1999 14:02:11 +0200 (MET DST) Sender: weis To: caml-list@inria.fr Subject: ocamlyacc and error messages From: "David Mentr'e" Date: 06 Sep 1999 14:02:11 +0200 Message-ID: User-Agent: Gnus/5.070096 (Pterodactyl Gnus v0.96) Emacs/20.3 MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hello/Bonjour, [[ Français (résumé) ]] Comment donner le numéro de ligne et le point d'échec dans une grammaire d'un parser généré par ocamlyacc ? [[ English ]] What is the simplest way to report an error in a parser generated by ocamlyacc ? I would like to report : 1. line number in parsed file 2. failing rule number in grammar The point (1) is essential for me. Right know, I have a 'Fatal error: uncaught exception Parsing.Parse_error' not very meaningful. :) I would prefer have a message like 'parse error on line N in source file, stucked in grammar rule foo:'. I've looked at FAQs, mailing-list archive, ocaml sources and ocamlyacc documentation but did not found very useful info : . nothing in faqs . mailing-list : an old message related to caml (not *o*caml) http://caml.inria.fr/caml-list/0061.html . ocaml parser in too complicated (rich error handling) . ocamlyacc doc is minimal Thanks for any pointer, david d. -- David.Mentre@irisa.fr -- http://www.irisa.fr/prive/dmentre/ Opinions expressed here are only mine.