Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "David Mentr'e" <David.Mentre@irisa.fr>
To: caml-list@inria.fr
Subject: ocamlyacc and error messages
Date: 06 Sep 1999 14:02:11 +0200	[thread overview]
Message-ID: <wd8671ow8n0.fsf@parate.irisa.fr> (raw)

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.




             reply	other threads:[~1999-09-06 16:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-06 12:02 David Mentr'e [this message]
1999-09-07  7:00 ` Jean-Christophe Filliatre

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=wd8671ow8n0.fsf@parate.irisa.fr \
    --to=david.mentre@irisa.fr \
    --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