From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id ED8AC80125 for ; Tue, 2 May 2017 21:49:48 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.38,280,1491256800"; d="scan'208";a="271385055" Received: from bou78-2-82-240-46-163.fbx.proxad.net (HELO MP-41019.local) ([82.240.46.163]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 02 May 2017 21:49:48 +0200 To: caml-list@inria.fr References: <971FC6F9-5D09-42B6-BAF7-1C494B14D14F@gmx.net> From: =?UTF-8?Q?Fran=c3=a7ois_Pottier?= Message-ID: <5908E2E0.8050402@inria.fr> Date: Tue, 2 May 2017 21:49:52 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <971FC6F9-5D09-42B6-BAF7-1C494B14D14F@gmx.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] menhir should reference source file and not generated source file Hello, Le 02/05/2017 19:09, Helmut Brandl a écrit : > I continue to have the problem that any assertion failure reported by the > runtime system always references the source file of the generated parser > (i.e. the .ml file) and not the source file (i.e. the .mly file). Is there > any way to ask menhir to use the line numbers of the source file instead of > the generated source? That's a good question, which I don't think anyone has asked before. Looking into this issue, it turns out that if "menhir" is used, then the generated .ml file does contain appropriate line number information (such as # 4 "sample.mly"), whereas if "menhir --infer" is used, then this information is omitted. The difference is observable if Assertion_failure is raised. This is definitely a bug, which I will look into. Thanks for reporting this! -- François Pottier francois.pottier@inria.fr http://gallium.inria.fr/~fpottier/