caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Helmut Brandl <helmut.brandl@gmx.net>
To: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] menhir should reference source file and not generated source file
Date: Tue, 2 May 2017 20:18:28 -0500	[thread overview]
Message-ID: <E11AF6D2-2510-4979-ADEA-149F47B1E073@gmx.net> (raw)
In-Reply-To: <5908E2E0.8050402@inria.fr>


> On May 2, 2017, at 14:49, François Pottier <francois.pottier@inria.fr> wrote:
> 
> 
> 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!


Thanks for the feedback. I use “—infer” because it has been highly recommended in the manual.

Regards
Helmut

  reply	other threads:[~2017-05-03  1:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-02 17:09 Helmut Brandl
2017-05-02 19:49 ` François Pottier
2017-05-03  1:18   ` Helmut Brandl [this message]
2017-05-09 19:32 ` François Pottier
2017-05-11  2:28   ` Helmut Brandl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E11AF6D2-2510-4979-ADEA-149F47B1E073@gmx.net \
    --to=helmut.brandl@gmx.net \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).